Dragmode#
By default, you can adjust the scale and display sector of Plotly plots by dragging them with your mouse. Sometimes this feature is not suitable, so you can disable it by setting the dragmode
layout property to False
.
In the following example I build absolutely inetic plots, but in the first case dragmode=True
(defalut case), in the second case dragmode=False
. So try it yourself - you can drag the first plot and cat the second.
import numpy as np
import plotly.graph_objects as go
samples_counts = 1000
x_values = np.random.uniform(0, 100, samples_counts)
y_values = np.random.uniform(0, 100, samples_counts)
my_scatter = go.Scatter(
x = x_values,
y = y_values,
mode = "markers"
)
go.Figure(my_scatter).show()
go.Figure(
data = my_scatter,
layout=dict(dragmode = False)
).show()