# Auto-playing an animation once when a plot is loaded

**URL:** <https://community.plotly.com/t/auto-playing-an-animation-once-when-a-plot-is-loaded/6032>\
**Category:** 📊 Plotly Python\
**Created:** [October 2, 2017, 2:18pm UTC](https://community.plotly.com/t/auto-playing-an-animation-once-when-a-plot-is-loaded/6032 "2017-10-02T14:18:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![janfreyberg](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/janfreyberg/32/1864_2.png) [@janfreyberg](https://community.plotly.com/u/janfreyberg)\
**Post date:** [October 2, 2017, 2:18pm UTC](https://community.plotly.com/t/auto-playing-an-animation-once-when-a-plot-is-loaded/6032/1 "2017-10-02T14:18:27Z")

</div>

Hi all,

I’d like to animate a plotly figure once, when it’s loading. The idea is to create an “explosion” effect for a scatter plot, where when the plot is loaded / produced, the plots explode from the centre and settle in their coordinates. It should look a bit like the second part of the animations here: [http://mcaule.github.io/d3\_exploding\_boxplot/](http://mcaule.github.io/d3_exploding_boxplot/), but it should play once automatically when the figure is loaded.

It’s really just to make the graph more playful, and make it clearer that it’s a dynamic plot.

However, at least based on what I could find in the documentation, autoplay animations seem to be implemented with a play / pause button? Is there a way to make this happen?

The graph is produced with the python API in plotly and served with Flask.

Thanks!

Jan

---

<div class="post-metadata">

**Author:** ![nawal\_bo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nawal\_bo](https://community.plotly.com/u/nawal_bo)\
**Post date:** [January 26, 2022, 6:28pm UTC](https://community.plotly.com/t/auto-playing-an-animation-once-when-a-plot-is-loaded/6032/2 "2022-01-26T18:28:19Z")

</div>

Did you ever figure this out? I’m also searching for an answer but couldn’t find any.
