✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Tick's value in axis is not exactly what is specified as dvalue

Hi, I try to configure the tick value on yaxis to be 0 , 4096, 8192 … by calling

fig.update_yaxes(dvalue = 4096 … )

But the graph has ticks at 4100 8200 … . Any idea how to change it ?

Thanks and best regards
XInwei

Hi @Xinwei,

print(help(go.layout.YAXis.dvalue) )

gives:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-19-7ff3097698bd> in <module>
      1 import plotly.graph_objects as go
----> 2 help(go.layout.YAxis.dvalue)

AttributeError: type object 'YAxis' has no attribute 'dvalue'

To customize yaxis ticks, perform the following yaxes_update:

tickvals = [k*4096 for in range(0, n)]  #give an appropriate n

fig.update_yaxes(tickvals=tickvals, ticktext=tickvals)