Hey all, based on answers to some other questions I was trying to plot a time series where I can switch from linear to log scale on the y axis. It seems the way to go is using updatemenus, so I tried this:
updatemenus = [
dict(
type="buttons",
direction="left",
buttons=list([
dict(
args=[{'yaxis': {'type': 'linear'}}],
label="Linear Scale",
method="update"
),
dict(
args=[{'yaxis': {'type': 'log'}}],
label="Log Scale",
method="update"
)
])
),
]
fig = px.line(df, x='date', y='total_cases', color='country') #Time series for all countries in my table
fig.update_layout(
updatemenus=updatemenus
)
This brings me this plot:
Which looks fine, but, when I press log scale, the plot remains the same:
What am I missing? I guess it’s something simple. Any help would be kindly appreciated