W3cubDocs

/Matplotlib 3.5

matplotlib.animation.PillowWriter

classmatplotlib.animation.PillowWriter(fps=5, metadata=None, codec=None, bitrate=None)[source]
__init__(fps=5, metadata=None, codec=None, bitrate=None)[source]

Methods

__init__([fps, metadata, codec, bitrate])

finish()

Finish any processing for writing the movie.

grab_frame(**savefig_kwargs)

Grab the image information from the figure and save as a movie frame.

isAvailable()

saving(fig, outfile, dpi, *args, **kwargs)

Context manager to facilitate writing the movie file.

setup(fig, outfile[, dpi])

Setup for writing the movie file.

Attributes

frame_size

A tuple (width, height) in pixels of a movie frame.

finish()[source]

Finish any processing for writing the movie.

grab_frame(**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 savefig call that saves the figure.

classmethodisAvailable()[source]
setup(fig, outfile, dpi=None)[source]

Setup for writing the movie file.

Parameters
figFigure

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.

© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.animation.PillowWriter.html