Logical figure that can be placed inside a figure.
See SubFigure for an index of methods on this class. Typically instantiated using Figure.add_subfigure or SubFigure.add_subfigure, or SubFigure.subfigures. A subfigure has the same methods as a figure except for those particularly tied to the size or dpi of the figure, and is confined to a prescribed region of the figure. For example the following puts two subfigures side-by-side:
fig = plt.figure() sfigs = fig.subfigures(1, 2) axsL = sfigs[0].subplots(1, 2) axsR = sfigs[1].subplots(2, 1)
Note
The subfigure concept is new in v3.4, and the API is still provisional.
Figure or SubFigure
Figure or subfigure that contains the SubFigure. SubFigures can be nested.
gridspec.SubplotSpec
Defines the region in a parent gridspec where the subfigure will be placed.
"none"
The figure patch face color; transparent by default.
rcParams["figure.edgecolor"] (default: 'white')
The figure patch edge color.
The linewidth of the frame (i.e. the edge linewidth of the figure patch).
rcParams["figure.frameon"] (default: True)
If False, suppress drawing the figure background patch.
SubFigure properties, optional
Property | Description |
|---|---|
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image | |
scalar or None | |
bool | |
| |
bool | |
Patch or (Path, Transform) or None | |
float | |
bool | |
str | |
bool | |
object | |
number | |
bool | |
list of | |
None or bool or float or callable | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
bool | |
float |
© 2012–2023 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/stable/api/_as_gen/matplotlib.figure.SubFigure.html