You are reading an old version of the documentation (v3.1.3). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.gridspec.GridSpecBase.html
Version 3.1.3
matplotlib
Fork me on GitHub

matplotlib.gridspec.GridSpecBase

class matplotlib.gridspec.GridSpecBase(nrows, ncols, height_ratios=None, width_ratios=None)[source]

Bases: object

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

The number of rows and number of columns of the grid need to be set. Optionally, the ratio of heights and widths of rows and columns can be specified.

get_geometry(self)[source]

Return a tuple containing the number of rows and columns in the grid.

get_grid_positions(self, fig, raw=False)[source]

Return lists of bottom and top position of rows, left and right positions of columns.

If raw=True, then these are all in units relative to the container with no margins. (used for constrained_layout).

get_height_ratios(self)[source]
get_subplot_params(self, figure=None, fig=None)[source]
get_width_ratios(self)[source]
new_subplotspec(self, loc, rowspan=1, colspan=1)[source]

Create and return a SubplotSpec instance.

set_height_ratios(self, height_ratios)[source]
set_width_ratios(self, width_ratios)[source]