Skip to content

Add note on keeping a reference to animation docstrings #18896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,12 @@ class Animation:
This class is not usable as is, and should be subclassed to provide needed
behavior.

.. note::

You must store the created Animation in a variable that lives as long
as the animation should run. Otherwise, the Animation object will be
garbage-collected and the animation stops.

Parameters
----------
fig : `~matplotlib.figure.Figure`
Expand Down Expand Up @@ -1394,6 +1400,12 @@ class TimedAnimation(Animation):

A new frame is drawn every *interval* milliseconds.

.. note::

You must store the created Animation in a variable that lives as long
as the animation should run. Otherwise, the Animation object will be
garbage-collected and the animation stops.

Parameters
----------
fig : `~matplotlib.figure.Figure`
Expand Down Expand Up @@ -1462,6 +1474,12 @@ class ArtistAnimation(TimedAnimation):
Before creating an instance, all plotting should have taken place
and the relevant artists saved.

.. note::

You must store the created Animation in a variable that lives as long
as the animation should run. Otherwise, the Animation object will be
garbage-collected and the animation stops.

Parameters
----------
fig : `~matplotlib.figure.Figure`
Expand Down Expand Up @@ -1529,6 +1547,12 @@ class FuncAnimation(TimedAnimation):
"""
Makes an animation by repeatedly calling a function *func*.

.. note::

You must store the created Animation in a variable that lives as long
as the animation should run. Otherwise, the Animation object will be
garbage-collected and the animation stops.

Parameters
----------
fig : `~matplotlib.figure.Figure`
Expand Down