You are reading an old version of the documentation (v2.0.1). For the latest version see


This Page


class matplotlib.animation.ArtistAnimation(fig, artists, *args, **kwargs)

Animation using a fixed set of Artist objects.

Before creating an instance, all plotting should have taken place and the relevant artists saved.


fig : matplotlib.figure.Figure

The figure object that is used to get draw, resize, and any other needed events.

artists : list

Each list entry a collection of artists that represent what needs to be enabled on each frame. These will be disabled for other frames.

interval : number, optional

Delay between frames in milliseconds. Defaults to 200.

repeat_delay : number, optional

If the animation in repeated, adds a delay in milliseconds before repeating the animation. Defaults to None.

repeat : bool, optional

Controls whether the animation should repeat when the sequence of frames is completed. Defaults to True.

blit : bool, optional

Controls whether blitting is used to optimize drawing. Defaults to False.

__init__(fig, artists, *args, **kwargs)


__init__(fig, artists, *args, **kwargs)
new_frame_seq() Creates a new sequence of frame information.
new_saved_frame_seq() Creates a new sequence of saved/cached frame information.
save(filename[, writer, fps, dpi, codec, ...]) Saves a movie file by drawing every frame.
to_html5_video() Returns animation as an HTML5 video tag.