matplotlib / 3.5.1 / _as_gen / mpl_toolkits.axes_grid1.axes_divider.divider.html /

mpl_toolkits.axes_grid1.axes_divider.Divider

class mpl_toolkits.axes_grid1.axes_divider. Divider ( fig, pos, horizontal, vertical, aspect=None, anchor='C' ) [source]

Bases: object

An Axes positioning class.

The divider is initialized with lists of horizontal and vertical sizes (mpl_toolkits.axes_grid1.axes_size) based on which a given rectangular area will be divided.

The new_locator method then creates a callable object that can be used as the axes_locator of the axes.

Parameters
fig Figure
pos tuple of 4 floats

Position of the rectangle that will be divided.

horizontal list of axes_size

Sizes for horizontal division.

vertical list of axes_size

Sizes for vertical division.

aspect bool

Whether overall rectangular area is reduced so that the relative part of the horizontal and vertical scales have the same scale.

anchor {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'}

Placement of the reduced rectangle, when aspect is True.

add_auto_adjustable_area ( use_axes, pad=0.1, adjust_dirs=None ) [source]
append_size ( position, size ) [source]
get_anchor ( ) [source]

Return the anchor.

get_aspect ( ) [source]

Return aspect.

get_horizontal ( ) [source]

Return horizontal sizes.

get_horizontal_sizes ( renderer ) [source]
get_locator ( ) [source]
get_position ( ) [source]

Return the position of the rectangle.

get_position_runtime ( ax, renderer ) [source]
get_vertical ( ) [source]

Return vertical sizes.

get_vertical_sizes ( renderer ) [source]
get_vsize_hsize ( ) [source]

[Deprecated]

Notes

Deprecated since version 3.5:

locate ( nx, ny, nx1=None, ny1=None, axes=None, renderer=None ) [source]
Parameters
nx, nx1 int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.

ny, ny1 int

Same as nx and nx1, but for row positions.

axes
renderer
new_locator ( nx, ny, nx1=None, ny1=None ) [source]

Return a new AxesLocator for the specified cell.

Parameters
nx, nx1 int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.

ny, ny1 int

Same as nx and nx1, but for row positions.

set_anchor ( anchor ) [source]
Parameters
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

Either an (x, y) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C' (center), or a cardinal direction ('SW', southwest, is bottom left, etc.).

See also

Axes.set_anchor
set_aspect ( aspect=False ) [source]
Parameters
aspect bool
set_horizontal ( h ) [source]
Parameters
h list of axes_size

sizes for horizontal division

set_locator ( _locator ) [source]
set_position ( pos ) [source]

Set the position of the rectangle.

Parameters
pos tuple of 4 floats

position of the rectangle that will be divided

set_vertical ( v ) [source]
Parameters
v list of axes_size

sizes for vertical division

© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider.html