How to animate without a button

Ok, I am using Plotly for python and was trying to animate, I got stuck over Intro to Animation, in all the animation example using Graph Objects a button was required to start the animation, here’s my problem:

What should I do if I want to loop over or start the animation without any button?

Thanks,
Dex Devlon.

Thanks for using the community forum!

Can you please provide some more details about your development environment and your use case? What version of plotly.py are you using, and are you using it in an interactive development environment or in a Jupyter notebook?

If you are able to export your figure as an HTML file, you should be able to take advantage of the auto_play attribute of the write_html() function (which is documented at https://plotly.com/python/interactive-html-export/#full-parameter-documentation) in order to automatically start an animation in your figure.

I am trying to create a animation that auto plays, that’s pretty much it, if you want the code its available at https://www.github.com/bin0x00/covid-19 though I do think its useless now, and thanks that helped me quite a bit.

1 Like