W3cubDocs

/Matplotlib 3.5

matplotlib.gridspec

gridspec contains classes that help to layout multiple Axes in a grid-like pattern within a figure.

The GridSpec specifies the overall grid structure. Individual cells within the grid are referenced by SubplotSpecs.

Often, users need not access this module directly, and can use higher-level methods like subplots, subplot_mosaic and subfigures. See the tutorial Arranging multiple Axes in a Figure for a guide.

Classes

GridSpec(nrows, ncols[, figure, left, ...])

A grid layout to place subplots within a figure.

SubplotSpec(gridspec, num1[, num2])

The location of a subplot in a GridSpec.

GridSpecBase(nrows, ncols[, height_ratios, ...])

A base class of GridSpec that specifies the geometry of the grid that a subplot will be placed.

GridSpecFromSubplotSpec(nrows, ncols, ...[, ...])

GridSpec whose subplot layout parameters are inherited from the location specified by a given SubplotSpec.

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