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


Table Of Contents

This Page


matplotlib.pyplot.subplot2grid(shape, loc, rowspan=1, colspan=1, fig=None, **kwargs)

Create a subplot in a grid. The grid is specified by shape, at location of loc, spanning rowspan, colspan cells in each direction. The index for loc is 0-based. The current figure will be used unless fig is specified.

subplot2grid(shape, loc, rowspan=1, colspan=1)

is identical to

gridspec=GridSpec(shape[0], shape[1])
subplotspec=gridspec.new_subplotspec(loc, rowspan, colspan)