You are reading an old version of the documentation (v3.1.0). For the latest version see
Version 3.1.0
Fork me on GitHub


class mpl_toolkits.axes_grid1.axes_divider.SubplotDivider(fig, *args, horizontal=None, vertical=None, aspect=None, anchor='C')[source]

Bases: mpl_toolkits.axes_grid1.axes_divider.Divider

The Divider class whose rectangle area is specified as a subplot geometry.

fig : matplotlib.figure.Figure
*args : tuple (numRows, numCols, plotNum)

The array of subplots in the figure has dimensions numRows, numCols, and plotNum is the number of the subplot being created. plotNum starts at 1 in the upper left corner and increases to the right.

If numRows <= numCols <= plotNum < 10, args can be the decimal integer numRows * 100 + numCols * 10 + plotNum.

change_geometry(self, numrows, numcols, num)[source]

change subplot geometry, e.g., from 1,1,1 to 2,2,3


get the subplot geometry, e.g., 2,2,3


return the bounds of the subplot box


get the SubplotSpec instance

set_subplotspec(self, subplotspec)[source]

set the SubplotSpec instance


update the subplot position from fig.subplotpars