subplot_grid.__getitem__

subplot_grid.__getitem__(key)[source]

If an integer is passed, the item is returned. If a slice is passed, a subplot_grid of the items is returned. You can also use 2D indexing, and the corresponding axes in the subplot_grid will be chosen.

Example

>>> import proplot as plot
... f, axs = plot.subplots(nrows=3, ncols=3, colorbars='b', bstack=2)
... axs[0] # the subplot in the top-right corner
... axs[3] # the first subplot in the second row
... axs[1,2] # the subplot in the second row, third from the left
... axs[:,0] # the subplots in the first column