matplotlib.figure

matplotlib.figure implements the following classes:

Figure

Top level ~matplotlib.artist.Artist, which holds all plot elements. Many methods are implemented in FigureBase.

SubFigure

A logical figure inside a figure, usually added to a figure (or parent SubFigure) with Figure.add_subfigure or Figure.subfigures methods (provisional API v3.4).

SubplotParams

Control the default spacing between subplots.

Figures are typically created using pyplot methods ~.pyplot.figure, ~.pyplot.subplots, and ~.pyplot.subplot_mosaic.

Some situations call for directly instantiating a ~.figure.Figure class, usually inside an application of some sort (see user_interfaces for a list of examples) . More information about Figures can be found at figure_explanation.