# Run plotly animation in infinite loop

**URL:** <https://community.plotly.com/t/run-plotly-animation-in-infinite-loop/25534>\
**Category:** 📊 Plotly Python\
**Created:** [July 6, 2019, 12:55pm UTC](https://community.plotly.com/t/run-plotly-animation-in-infinite-loop/25534 "2019-07-06T12:55:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajm](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@ajm](https://community.plotly.com/u/ajm)\
**Post date:** [July 6, 2019, 12:55pm UTC](https://community.plotly.com/t/run-plotly-animation-in-infinite-loop/25534/1 "2019-07-06T12:55:13Z")

</div>

The animation from [https://plot.ly/python/animations/#offline-mode](https://plot.ly/python/animations/#offline-mode) as shown in the code below goes through 1 loop when created.  
Is it possible to have the animation run in an infinite loop?  
Thanks in advance.

```
from plotly.offline import init_notebook_mode, iplot
from IPython.display import display, HTML

init_notebook_mode(connected=True)

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'}}]}

iplot(figure)
```
