mpl_toolkits.axisartist.axes_grid.Grid#

class mpl_toolkits.axisartist.axes_grid.Grid(fig, rect, nrows_ncols, ngrids=None, direction='row', axes_pad=0.02, *, share_all=False, share_x=True, share_y=True, label_mode='L', axes_class=None, aspect=False)[source]#

Bases: Grid

[Deprecated]

Notes

Deprecated since version 3.8: Use axes_grid1.axes_grid.Grid(..., axes_class=axislines.Axes instead.

Parameters:
figFigure

The parent figure.

rect(float, float, float, float), (int, int, int), int, or SubplotSpec

The axes position, as a (left, bottom, width, height) tuple, as a three-digit subplot position code (e.g., (1, 2, 1) or 121), or as a SubplotSpec.

nrows_ncols(int, int)

Number of rows and columns in the grid.

ngridsint or None, default: None

If not None, only the first ngrids axes in the grid are created.

direction{"row", "column"}, default: "row"

Whether axes are created in row-major ("row by row") or column-major order ("column by column"). This also affects the order in which axes are accessed using indexing (grid[index]).

axes_padfloat or (float, float), default: 0.02

Padding or (horizontal padding, vertical padding) between axes, in inches.

share_allbool, default: False

Whether all axes share their x- and y-axis. Overrides share_x and share_y.

share_xbool, default: True

Whether all axes of a column share their x-axis.

share_ybool, default: True

Whether all axes of a row share their y-axis.

label_mode{"L", "1", "all", "keep"}, default: "L"

Determines which axes will get tick labels:

  • "L": All axes on the left column get vertical tick labels; all axes on the bottom row get horizontal tick labels.

  • "1": Only the bottom left axes is labelled.

  • "all": All axes are labelled.

  • "keep": Do not do anything.

axes_classsubclass of matplotlib.axes.Axes, default: None
aspectbool, default: False

Whether the axes aspect ratio follows the aspect ratio of the data limits.