Is it possible to allow rotation while an animation is running?

Hi,

I want to create a 3dScatter plot to plot just 1 point. The point moves in time. So I use the frames to create this animation. It works. But my problem is that I cannot rotate the 3d scatter plot while running the animation but just before it begins or after it ends. Do you know how to handle this problem ?

Here is my code :

import plotly.graph_objects as go

fig = go.Figure(
    data=[go.Scatter3d(x=[1], y=[1], z=[1], mode='markers')],
    layout=go.Layout(
        title="Start Title",
        updatemenus=[dict(
            type="buttons",
            buttons=[dict(label="Play",
                          method="animate",
                          args=[None])])]
    ),
    frames=[go.Frame(data=[go.Scatter3d(x=[1], y=[1], z=[2], mode='markers')]),
            go.Frame(data=[go.Scatter3d(x=[2], y=[2], z=[2], mode='markers')]),
            go.Frame(data=[go.Scatter3d(x=[3], y=[3], z=[2], mode='markers')]),
            go.Frame(data=[go.Scatter3d(x=[1], y=[1], z=[2], mode='markers')]),
            go.Frame(data=[go.Scatter3d(x=[2], y=[2], z=[2], mode='markers')]),
            go.Frame(data=[go.Scatter3d(x=[3], y=[3], z=[2], mode='markers')]),
            go.Frame(data=[go.Scatter3d(x=[1], y=[1], z=[2], mode='markers')]),
            go.Frame(data=[go.Scatter3d(x=[2], y=[2], z=[2], mode='markers')]),
            go.Frame(data=[go.Scatter3d(x=[3], y=[3], z=[2], mode='markers')])
            ]
)



fig.update_layout(
    scene = dict(
        xaxis = dict(nticks=4, range=[0,5],),
        yaxis = dict(nticks=4, range=[0,5],),
        zaxis = dict(nticks=4, range=[0,5],),),
    margin=dict(r=20, l=10, b=10, t=10))

fig.show()

Hello @juancoach,

Try using the argument, uirevision=True to the layout. This might keep it during the animations.