You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 2.0.0b1.post7580.dev0+ge487118
matplotlib
Fork me on GitHub

This Page

matplotlib.gridspec.SubplotSpec

class matplotlib.gridspec.SubplotSpec(gridspec, num1, num2=None)

Specifies the location of the subplot in the given GridSpec.

The subplot will occupy the num1-th cell of the given gridspec. If num2 is provided, the subplot will span between num1-th cell and num2-th cell.

The index starts from 0.

get_geometry()

Get the subplot geometry (n_rows, n_cols, row, col).

Unlike SuplorParams, indexes are 0-based.

get_gridspec()
get_position(fig, return_all=False)

Update the subplot position from fig.subplotpars.

get_topmost_subplotspec()

get the topmost SubplotSpec instance associated with the subplot