matplotlib.animation.PillowWriter¶
-
class
matplotlib.animation.PillowWriter(fps=5, metadata=None, codec=None, bitrate=None)[source]¶ -
__init__(self, fps=5, metadata=None, codec=None, bitrate=None)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(self[, fps, metadata, codec, bitrate])Initialize self. finish(self)Finish any processing for writing the movie. grab_frame(self, **savefig_kwargs)Grab the image information from the figure and save as a movie frame. isAvailable()saving(self, fig, outfile, dpi, *args, **kwargs)Context manager to facilitate writing the movie file. setup(self, fig, outfile[, dpi])Setup for writing the movie file. Attributes
frame_sizeA tuple (width, height)in pixels of a movie frame.-
grab_frame(self, **savefig_kwargs)[source]¶ Grab the image information from the figure and save as a movie frame.
All keyword arguments in savefig_kwargs are passed on to the
savefigcall that saves the figure.
-
setup(self, fig, outfile, dpi=None)[source]¶ Setup for writing the movie file.
Parameters: - fig
Figure The figure object that contains the information for frames.
- outfilestr
The filename of the resulting movie file.
- dpifloat, default:
fig.dpi The DPI (or resolution) for the file. This controls the size in pixels of the resulting movie file.
- fig
-