matplotlib / 3.4.3 / _as_gen / matplotlib.axes.subplotbase.html /

matplotlib.axes.SubplotBase

class matplotlib.axes. SubplotBase ( fig, *args, **kwargs ) [source]

Bases: object

Base class for subplots, which are Axes instances with additional methods to facilitate generating and manipulating a set of Axes within a figure.

Parameters:
fig matplotlib.figure.Figure
*args tuple (nrows, ncols, index) or int

The array of subplots in the figure has dimensions (nrows, ncols), and index is the index of the subplot being created. index starts at 1 in the upper left corner and increases to the right.

If nrows, ncols, and index are all single digit numbers, then args can be passed as a single 3-digit number (e.g. 234 for (2, 3, 4)).

**kwargs

Keyword arguments are passed to the Axes (sub)class constructor.

__dict__ = mappingproxy({'__module__': 'matplotlib.axes._subplots', '__doc__': '\n Base class for subplots, which are :class:`Axes` instances with\n additional methods to facilitate generating and manipulating a set\n of :class:`Axes` within a figure.\n ', '__init__': <function SubplotBase.__init__>, '__reduce__': <function SubplotBase.__reduce__>, 'get_geometry': <function SubplotBase.get_geometry>, 'change_geometry': <function SubplotBase.change_geometry>, 'get_subplotspec': <function SubplotBase.get_subplotspec>, 'set_subplotspec': <function SubplotBase.set_subplotspec>, 'get_gridspec': <function SubplotBase.get_gridspec>, 'figbox': <matplotlib._api.deprecation.deprecated.<locals>.deprecate.<locals>._deprecated_property object>, 'numRows': <matplotlib._api.deprecation.deprecated.<locals>.deprecate.<locals>._deprecated_property object>, 'numCols': <matplotlib._api.deprecation.deprecated.<locals>.deprecate.<locals>._deprecated_property object>, 'update_params': <function SubplotBase.update_params>, 'is_first_row': <function SubplotBase.is_first_row>, 'is_last_row': <function SubplotBase.is_last_row>, 'is_first_col': <function SubplotBase.is_first_col>, 'is_last_col': <function SubplotBase.is_last_col>, 'label_outer': <function SubplotBase.label_outer>, '_make_twin_axes': <function SubplotBase._make_twin_axes>, '__dict__': <attribute '__dict__' of 'SubplotBase' objects>, '__weakref__': <attribute '__weakref__' of 'SubplotBase' objects>, '__annotations__': {}})
__init__ ( fig, *args, **kwargs ) [source]
Parameters:
fig matplotlib.figure.Figure
*args tuple (nrows, ncols, index) or int

The array of subplots in the figure has dimensions (nrows, ncols), and index is the index of the subplot being created. index starts at 1 in the upper left corner and increases to the right.

If nrows, ncols, and index are all single digit numbers, then args can be passed as a single 3-digit number (e.g. 234 for (2, 3, 4)).

**kwargs

Keyword arguments are passed to the Axes (sub)class constructor.

__module__ = 'matplotlib.axes._subplots'
__reduce__ ( ) [source]

Helper for pickle.

__weakref__

list of weak references to the object (if defined)

change_geometry ( numrows, numcols, num ) [source]

[Deprecated] Change subplot geometry, e.g., from (1, 1, 1) to (2, 2, 3).

Notes

Deprecated since version 3.4.

property figbox
get_geometry ( ) [source]

[Deprecated] Get the subplot geometry, e.g., (2, 2, 3).

Notes

Deprecated since version 3.4.

get_gridspec ( ) [source]

Return the GridSpec instance associated with the subplot.

get_subplotspec ( ) [source]

Return the SubplotSpec instance associated with the subplot.

is_first_col ( ) [source]

[Deprecated]

Notes

Deprecated since version 3.4:

is_first_row ( ) [source]

[Deprecated]

Notes

Deprecated since version 3.4:

is_last_col ( ) [source]

[Deprecated]

Notes

Deprecated since version 3.4:

is_last_row ( ) [source]

[Deprecated]

Notes

Deprecated since version 3.4:

label_outer ( ) [source]

Only show "outer" labels and tick labels.

x-labels are only kept for subplots on the last row; y-labels only for subplots on the first column.

property numCols
property numRows
set_subplotspec ( subplotspec ) [source]

Set the SubplotSpec. instance associated with the subplot.

update_params ( ) [source]

[Deprecated] Update the subplot position from self.figure.subplotpars.

Notes

Deprecated since version 3.4.

Examples using matplotlib.axes.SubplotBase

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