Plotly graph is showing duplicate y-axis tick marks when you zoom in

Hello all, as the title say I am encountering with the duplicate y-axis tick marks as I zoom in on a Plotly graph. Not sure whether it is due to the structure of a time series data or a problem with the Plotly graph itself. I have experiment with all the layout.yaxis ticks related options with no avail.

As last resort, I even experimented with setting number of ticks equal to the unique rank values in the data set, again no hope :frowning:

            date  rank    rating
2179 2023-02-27    10  0.023367
2180 2023-02-28    10  0.023364
2181 2023-03-01    10  0.023361
2182 2023-03-02    10  0.023366
2183 2023-03-03    10  0.023363
...         ...   ...       ...

Couple of screenshots from the problem I am having:

Any help would greatly appreciated,
Thanks to all in advance!

I think there is an example on the docs for different ranges depending on the zoom which might help you.

Edit: this one.

2 Likes

Are you formatting your y axis at all? If you are already formatting the y axis ticks to be integers, then this is likely a rounding issue where the tick marks in your image may be 66.1 and 66.3. Once you zoom in and it adds gridlines on non-integer values, it will still only display integers if that’s the tick formatting you have applied. AIMPED’s link shows how you can specify the tick mark formats at different zoom levels (aka y-value ranges for you)

For example, here is some data I work with that is generally in the 1000s. I am not formatting my y-axis values and this is what happens by default when I zoom in far enough:
image
image
image

Hey @GallopingNarwhal,
Thank you for your reply. Yeah I had also made the same conclusion as your suggestion. Indeed, It seems to be a rounding issue…