Hello everybody, I find myself in need of customizing an axis so that the ticks show the last day of each trimester instead of the first day of the following one.
While I was successful in doing so, I also noticed that providing the dtick
and tick0
parameters somehow disabled Plotly’s default behavior of decreasing the axis’ granularity if it becomes too “crowded”.
-
Desired output (note that it doesn’t have to be annual - this is merely the optimal setting for the current axis scale):
-
layout.xaxis.dtick = 'M3'
layout.xaxis.tick0 = '2000-03-31'
(correct, but too granular): -
layout.xaxis.dtick = 'M3'
layout.xaxis.tick0 = '2000-03-31'
layout.xaxis.tickmode = 'auto'
layout.xaxis.nticks = 7
(doesn’t seem to work):
I feel like I’m missing something obvious here. Thanks for your help!