Black Lives Matter. Please consider donating to Black Girls Code today.

Prevent Autoscaling

Does anyone know how to stop the graph (specifically the 3d scatter plot) from autoscaling? Would love a constant an absolute 0-100 axes regardless of the data.

Thank you in advance!

You can specify axis limits in the layout ( Remember to use the plotly documents for styling graphs.

layout = go.Layout(
scene = dict(
xaxis = dict(
nticks=4, range = [-100,100],),
yaxis = dict(
nticks=4, range = [-50,100],),
zaxis = dict(
nticks=4, range = [-100,100],),),
r=20, l=10,
b=10, t=10)

1 Like