I have been trying to create a contour plot. The data set comprises of 366 units in the X-axis and 216 units in the Y-axis. Hence the axes display values from 0 to 365 and 0 to 215 in the X and Y axes respectively.
I want to label the X-axis to display equally spaced names of 12 months. ie., Jan, Feb, β¦, Dec, and Y-axis to show only 3 points labelled -30, 0 and 30.
I want to create a line through the points of maxima.
When you donβt want to display as tick labels the values of your data, then plotly provides a βtrickβ, namely to set xaxis_tickvals, xaxis_ticktext. The former is the list of new values (positions) at which you want to display the corresponding strings/values in the list xaxis_ticktext.
In the above example we had:
tickvals = [(2*k-1)*hx/2 for k in range(1,13)]
ticktext= [datetime.date(2019, m, 1).strftime('%B') for m in range(1, 13)]