Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plotly: Turn off modebar for the session

I can turn off the modebar in plotly by passing displayModeBar: False as the value of config in fig.show(), like this-

import plotly.express as px

df = px.data.stocks()
fig = px.line(df, x='date', y='GOOG')

fig.show(config={'displayModeBar':False})

But is there a way I could do it just once for the entire session rather than having to pass it with each figure call?

like image 510
callmeanythingyouwant Avatar asked Oct 27 '25 08:10

callmeanythingyouwant


1 Answers

import plotly.io as pio

pio.renderers['jupyterlab'].config['displayModeBar'] = False
like image 71
Stas S Avatar answered Oct 30 '25 07:10

Stas S



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!