You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no option to access the animation options of Plotly.js from python. This makes it extremely difficult to make proper animations since the default time between frames in 500ms. I have added an extra keyword argument to offline.plot and offline.iplot called animation opts which allows the user to pass a python dictionary through and thus customize animations.
animation_opts (default=None) -- Custom animation parameters to be passed
to the function Plotly.animate in Plotly.js in the form str(dict)
Example:
from plotly.offline import plot
figure = {'data': [{'x': [0, 1], 'y': [0, 1]}],
'layout': {'xaxis': {'range': [0, 5], 'autorange': False},
'yaxis': {'range': [0, 5], 'autorange': False},
'title': 'Start Title'},
'frames': [{'data': [{'x': [1, 2], 'y': [1, 2]}]},
{'data': [{'x': [1, 4], 'y': [1, 4]}]},
{'data': [{'x': [3, 4], 'y': [3, 4]}],
'layout': {'title': 'End Title'}}]}
plot(figure,animation_opts="{frame: {duration: 1}}")
Hi @TakodaS, this sounds like a fine option to add. Feel free to open a pull request if you already have an implementation to start with 🙂 Although it would need to be reworked a little once we merge #1474, which will hopefully be this week.
Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson
Currently there is no option to access the animation options of Plotly.js from python. This makes it extremely difficult to make proper animations since the default time between frames in 500ms. I have added an extra keyword argument to offline.plot and offline.iplot called animation opts which allows the user to pass a python dictionary through and thus customize animations.
https://github.com/TakodaS/plotly.py
The text was updated successfully, but these errors were encountered: