-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
So far the button Play
only support a single frame duration and a single transition duration for all the steps of the animation. It would be very useful to support different duration values at different frame step. Note that I haven't any way to define specific duration per frame, I am open to suggestions.
Current:
fig.update_layout(
updatemenus=[{
'type': 'buttons',
'buttons': [
{
'label': 'Play',
'method': 'animate',
'args': [None, {
'fromcurrent': True,
'frame': {'duration': 100, 'redraw': False},
'transition': {'duration': 100}
}]
}
]
}]
)
Possible alternative way to pass information:
fig.update_layout(
updatemenus=[{
'type': 'buttons',
'buttons': [
{
'label': 'Play',
'method': 'animate',
'args': [None, {
'fromcurrent': True,
'frame': [(str(i), {'duration': 100 if i%2 == 0 else 1000, 'redraw': False}) for i in range(len(frames))],
'transition': [(str(i), {'duration': 100 if i%2 == 0 else 1000}) for i in range(len(frames))]
}]
}
]
}]
)
Metadata
Metadata
Assignees
Labels
No labels