matplotlib 3.5.1

NotesParametersReturnsBackRef
subplot2grid(shape, loc, rowspan=1, colspan=1, fig=None, **kwargs)

Notes

The following call :

ax = subplot2grid((nrows, ncols), (row, col), rowspan, colspan)

is identical to :

fig = gcf()
gs = fig.add_gridspec(nrows, ncols)
ax = fig.add_subplot(gs[row:row+rowspan, col:col+colspan])

Parameters

shape : (int, int)

Number of rows and of columns of the grid in which to place axis.

loc : (int, int)

Row number and column number of the axis location within the grid.

rowspan : int, default: 1

Number of rows for the axis to span downwards.

colspan : int, default: 1

Number of columns for the axis to span to the right.

fig : `.Figure`, optional

Figure to place the subplot in. Defaults to the current figure.

**kwargs :

Additional keyword arguments are handed to :None:None:`~.Figure.add_subplot`.

Returns

`.axes.SubplotBase`, or another subclass of `~.axes.Axes`

The axes of the subplot. The returned axes base class depends on the projection used. It is :None:None:`~.axes.Axes` if rectilinear projection is used and .projections.polar.PolarAxes if polar projection is used. The returned axes is then a subplot subclass of the base class.

Create a subplot at a specific location inside a regular grid.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.pyplot.figure matplotlib.pyplot.plotting

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/pyplot.py#1529
type: <class 'function'>
Commit: