Plotly: Turn off modebar for the session(Ploly:关闭会话的模式栏)
问题描述
我可以通过将displayModeBar: False
作为fig.show()
中的config
的值传递给fig.show()
这样-
import plotly.express as px
df = px.data.stocks()
fig = px.line(df, x='date', y='GOOG')
fig.show(config={'displayModeBar':False})
但是,有没有一种方法可以在整个会话中只做一次,而不是每次调用都要传递它?
推荐答案
import plotly.io as pio
pio.renderers['jupyterlab'].config['displayModeBar'] = False
这篇关于Ploly:关闭会话的模式栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!