matplotlib.animation.
FuncAnimation
(fig, func, frames=None, init_func=None, fargs=None, save_count=None, **kwargs)[source]¶Bases: matplotlib.animation.TimedAnimation
Makes an animation by repeatedly calling a function func.
Parameters: | fig : matplotlib.figure.Figure
func : callable
frames : iterable, int, generator function, or None, optional
init_func : callable, optional
fargs : tuple or None, optional
save_count : int, optional
interval : number, optional
repeat_delay : number, optional
repeat : bool, optional
blit : bool, optional
|
---|
save
(filename, writer=None, fps=None, dpi=None, codec=None, bitrate=None, extra_args=None, metadata=None, extra_anim=None, savefig_kwargs=None)¶Save the animation as a movie file by drawing every frame.
Parameters: | filename : str
writer :
fps : number, optional
dpi : number, optional
codec : str, optional
bitrate : number, optional
extra_args : list, optional
metadata : Dict[str, str], optional
extra_anim : list, optional
savefig_kwargs : dict, optional
|
---|
Notes
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
(embed_limit=None)¶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: | embed_limit : float, optional
|
---|---|
Returns: | video_tag : str
|
to_jshtml
(fps=None, embed_frames=True, default_mode=None)¶Generate HTML representation of the animation
matplotlib.animation.FuncAnimation
¶