class matplotlib.animation.Animation(fig, event_source=None, blit=False)
[source]
This class wraps the creation of an animation using matplotlib.
It is only a base class which should be subclassed to provide needed behavior.
This class is not typically used directly.
Parameters: |
|
---|
See also
FuncAnimation,
ArtistAnimation
__init__(self, fig, event_source=None, blit=False)
[source]
Initialize self. See help(type(self)) for accurate signature.
__init__ (self, fig[, event_source, blit]) | Initialize self. |
new_frame_seq (self) | Return a new sequence of frame information. |
new_saved_frame_seq (self) | Return a new sequence of saved/cached frame information. |
save (self, filename[, writer, fps, dpi, ...]) | Save the animation as a movie file by drawing every frame. |
to_html5_video (self[, embed_limit]) | Convert the animation to an HTML5 <video> tag. |
to_jshtml (self[, fps, embed_frames, ...]) | Generate HTML representation of the animation |
new_frame_seq(self)
[source]
Return a new sequence of frame information.
new_saved_frame_seq(self)
[source]
Return a new sequence of saved/cached frame information.
save(self, filename, writer=None, fps=None, dpi=None, codec=None, bitrate=None, extra_args=None, metadata=None, extra_anim=None, savefig_kwargs=None, *, progress_callback=None)
[source]
Save the animation as a movie file by drawing every frame.
Parameters: |
|
---|
fps, codec, bitrate, extra_args and metadata are used to construct a MovieWriter
instance and can only be passed if writer is a string. If they are passed as non-None and writer is a MovieWriter
, a RuntimeError
will be raised.
to_html5_video(self, embed_limit=None)
[source]
Convert the animation to an HTML5 <video>
tag.
This saves the animation as an h264 video, encoded in base64 directly into the HTML5 video tag. This respects the rc parameters for the writer as well as the bitrate. This also makes use of the interval
to control the speed, and uses the repeat
parameter to decide whether to loop.
Parameters: |
|
---|---|
Returns: |
|
to_jshtml(self, fps=None, embed_frames=True, default_mode=None)
[source]
Generate HTML representation of the animation
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.animation.Animation.html