Primary
matplotlib.figure ⚬|Documentation|1st|20251021163603-00-⌔
matplotlib.figure — Matplotlib documentation
matplotlib.figure
matplotlib.figureimplements the following classes:
FigureTop level
Artist, which holds all plot elements. Many methods are implemented inFigureBase.
SubFigureA logical figure inside a figure, usually added to a figure (or parent
SubFigure) withFigure.add_subfigureorFigure.subfiguresmethods.Figures are typically created using pyplot methods
figure,subplots, andsubplot_mosaic.fig, ax = plt.subplots(figsize=(2, 2), facecolor='lightskyblue', layout='constrained') fig.suptitle('Figure') ax.set_title('Axes', loc='left', fontstyle='oblique', fontsize='medium')(
Source code,2x.png,png)Some situations call for directly instantiating a
Figureclass, usually inside an application of some sort (see Embedding Matplotlib in graphical user interfaces for a list of examples). More information about Figures can be found at Introduction to Figures.Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •