O'Reilly logo

Interactive Applications Using Matplotlib by Benjamin V. Root

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The animation module

Now that we've had a crash course in animations for Matplotlib, let's take a step back and get to know the animation module. There is the base Animation class and three subclasses, namely, TimedAnimation, FuncAnimation, and ArtistAnimation. These classes handle all of the work necessary to initiate the animation upon call to show() and update the figure window with a new draw at the appropriate intervals. They also provide the interface to save your animation, hiding away many of the ugliness one might find when manually composing their own animation.

The most simple animation class is ArtistAnimation. You first perform all of the plotting, appending the artists of each frame into a list of lists. Each sublist represents all ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required