1

I am trying to embed an inline animation inside a Jupyter notebook. In particular, I want my animation to be indefinite.

In the past I have done this with a while loop recursively updating a plot. I am now trying to use the FuncAnimation approach.

After writing my animation code I am able to visualize it inline with:

anim = FuncAnimation(
        fig, animate, interval=200, init_func=init_plot,frames=10)
HTML(anim.to_html5_video())

This will take some time to generate and then produce an inline animation that is 10 frames.

However, I want an indefinite animation. It seems from the documentation that this should be achievable by omitting the frames argument. However, when I run this it does not terminate.

This is reasonable that it can't create an HTML video from a non-terminating iteration of frames. However, is there no way to use the FuncAnimation object to produce an inline, indefinite animation as though I was updating it inside an interactive plt.ion from a while loop?

Jesse
  • 1,662
  • 3
  • 17
  • 18
  • 1
    [Those are](https://stackoverflow.com/questions/35532498/animation-in-ipython-notebook/46878531#46878531) the options you have for creating animations in jupyter. – ImportanceOfBeingErnest Oct 10 '19 at 19:27

0 Answers0