I got code of Scatter line animation on Intro to animations with Python and its animating perfectly,
but, when i tried to write same code for Scatter3d it is not animating
import plotly.graph_objects as go
fig = go.Figure(
data=[go.Scatter3d(x=[0, 1], y=[0, 1], z=[0,1])],
layout=go.Layout(
scene=dict(
xaxis=dict(range=[0, 5], autorange=False),
yaxis=dict(range=[0, 5], autorange=False),
zaxis=dict(range=[0, 5], autorange=False),
),
width=500,
height=500,
updatemenus=[dict(
type="buttons",
buttons=[dict(label="Play",
method="animate",
args=[None])])]
),
frames=[go.Frame(data=[go.Scatter3d(x=[1, 2], y=[1, 2], z=[1, 2])]),
go.Frame(data=[go.Scatter3d(x=[1, 4], y=[1, 4], z=[1, 4])]),
go.Frame(data=[go.Scatter3d(x=[3, 4], y=[3, 4], z=[3, 4])]),
]
)
fig.show()