✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Why I cant see the all ticktext's?

Hi,

with this code I cant see the ticktext “Eleven”?
OK - I have no value greater then 10 - but I want to see the complete xaxis text. Is that possible?

import plotly.graph_objects as go

fig=go.Figure(go.Scatter(
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
y = [28.8, 28.5, 37, 56.8, 69.7, 79.7, 78.5, 77.8, 74.1, 62.6]
))

fig.update_layout(
xaxis = dict(
tickmode = ‘array’,
tickvals = [1, 3, 5, 7, 9, 11],
ticktext = [‘One’, ‘Three’, ‘Five’, ‘Seven’, ‘Nine’, ‘Eleven’],
)
)

fig.show()

I found the solution:

range=[0, 12],

thanks