Figure¶
-
class
Figure
(tight=None, pad=None, axpad=None, panelpad=None, includepanels=False, autoformat=True, ref=1, order='C', subplots_kw=None, gridspec_kw=None, subplots_orig_kw=None, tight_layout=None, constrained_layout=None, **kwargs)[source]¶ Bases:
matplotlib.figure.Figure
The
Figure
class returned bysubplots
. At draw-time, an improved tight layout algorithm is employed, and the space around the figure edge, between subplots, and between panels is changed to accommodate subplot content. Figure dimensions may be automatically scaled to preserve subplot aspect ratios.- Parameters
tight (bool, optional) – Toggles automatic tight layout adjustments. Default is
rc.tight
=True
.pad (float or str, optional) – Padding around edge of figure. Units are interpreted by
units
. Default isrc[‘subplots.pad’]
='0.5em'
.axpad (float or str, optional) – Padding between subplots in adjacent columns and rows. Units are interpreted by
units
. Default isrc[‘subplots.axpad’]
='1em'
.panelpad (float or str, optional) – Padding between subplots and axes panels, and between “stacked” panels. Units are interpreted by
units
. Default isrc[‘subplots.panelpad’]
='0.5em'
.includepanels (bool, optional) – Whether to include panels when centering x axis labels, y axis labels, and figure “super titles” along the edge of the subplot grid. Default is
False
.autoformat (bool, optional) – Whether to automatically configure x axis labels, y axis labels, axis formatters, axes titles, colorbar labels, and legend labels when a
Series
,DataFrame
orDataArray
with relevant metadata is passed to a plotting command.gridspec_kw, subplots_kw, subplots_orig_kw – Keywords used for initializing the main gridspec, for initializing the figure, and original spacing keyword args used for initializing the figure that override tight layout spacing.
- Other Parameters
ref, order – Documented in
subplots
.tight_layout, constrained_layout – Ignored, because ProPlot uses its own tight layout algorithm.
**kwargs – Passed to
matplotlib.figure.Figure
.
See also
Methods Summary
add_subplot
(*args, **kwargs)Issues warning for new users that try to call
add_subplot
manually.colorbar
(*args[, loc, width, space, row, …])Draws a colorbar along the left, right, bottom, or top side of the figure, centered between the leftmost and rightmost (or topmost and bottommost) main axes.
legend
(*args[, loc, width, space, row, col, …])Draws a legend along the left, right, bottom, or top side of the figure, centered between the leftmost and rightmost (or topmost and bottommost) main axes.