jupyter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
You can pass a config
dictionary with all configurations options such as scrollZoom
, editable
, and displayModeBar
. For the complete list of config options check out: https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=[1, 2, 3],
y=[1, 3, 1]))
fig.show(config={'scrollZoom': True})
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=[1, 2, 3],
y=[1, 3, 1]))
fig.show(config={'displayModeBar': True})
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=[1, 2, 3],
y=[1, 3, 1]))
fig.show(config={'editable': True})
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=[1, 2, 3],
y=[1, 3, 1]))
fig.show(config={
'scrollZoom': True,
'displayModeBar': True,
'editable': True
})
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=[1, 2, 3],
y=[1, 3, 1]))
fig.show(config={
'modeBarButtonsToRemove': ['toggleSpikelines','hoverCompareCartesian']
})
Sets the maximum delay between two consecutive clicks to be interpreted as a double-click in ms. This is the time interval between first mousedown, and' second mouseup. The default timing is 300 ms (less than half a second). This setting propagates to all on-subplot double clicks (except for geo and mapbox).
import plotly.graph_objects as go
fig = go.Figure(go.Bar(
y = [3, 5, 3, 2],
x = ["2019-09-02", "2019-10-10", "2019-11-12", "2019-12-22"],
texttemplate = "%{label}",
textposition = "inside"))
fig.update_layout(xaxis = {'type': 'date'})
fig.show(config = {'doubleClickDelay': 1000})
See config options at https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js#L6