mpl_toolkits.axes_grid1.axes_divider.Divider¶
- class mpl_toolkits.axes_grid1.axes_divider.Divider(fig, pos, horizontal, vertical, aspect=None, anchor='C')¶
Bases:
objectAn 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_locatormethod then creates a callable object that can be used as the axes_locator of the axes.- Parameters:
- figFigure
- postuple of 4 floats
Position of the rectangle that will be divided.
- horizontallist of
axes_size Sizes for horizontal division.
- verticallist of
axes_size Sizes for vertical division.
- aspectbool
Whether overall rectangular area is reduced so that the relative part of the horizontal and vertical scales have the same scale.
- anchor(float, float) or {'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)¶
Add auto-adjustable padding around use_axes to take their decorations (title, labels, ticks, ticklabels) into account during layout.
- append_size(position, size)¶
- get_anchor()¶
Return the anchor.
- get_aspect()¶
Return aspect.
- get_horizontal()¶
Return horizontal sizes.
- get_horizontal_sizes(renderer)¶
- get_locator()¶
- get_position()¶
Return the position of the rectangle.
- get_position_runtime(ax, renderer)¶
- get_vertical()¶
Return vertical sizes.
- get_vertical_sizes(renderer)¶
- get_vsize_hsize()¶
[Deprecated]
Notes
Deprecated since version 3.5:
- locate(nx, ny, nx1=None, ny1=None, axes=None, renderer=None)¶
- Parameters:
- nx, nx1int
Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise, the location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.
- ny, ny1int
Same as nx and nx1, but for row positions.
- axes
- renderer
- new_locator(nx, ny, nx1=None, ny1=None)¶
Return a new
AxesLocatorfor the specified cell.- Parameters:
- nx, nx1int
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, ny1int
Same as nx and nx1, but for row positions.
- set_anchor(anchor)¶
- Parameters:
- anchor(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'}
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
- set_aspect(aspect=False)¶
- Parameters:
- aspectbool
- set_locator(_locator)¶
- set_position(pos)¶
Set the position of the rectangle.
- Parameters:
- postuple of 4 floats
position of the rectangle that will be divided