Defining 'nticks' when using ticktext/tickvals

Hello Plotly community,

Does anyone know if there is a way of defining ‘nticks’ when using ticktext/tickvals?

When I zoom in/out, we can’t see the ticks not defined in ticktext/tickvals. I was wondering if we can fill ticktext/tickvals for several ticks, but when we zoom in/out, we would see only a given number (‘nticks’) ticks in the plot.


Attributes nticks and ticktext / tickvals are mutally exclusive. That is, nticks has no effect when ticktext and tickvals are set.

What would be a solution to this issue? Zooming out causes the values to be unreadable but I need to use ticktext and ticksvals to truncate the x axis values.