SubplotsContainer.__getitem__

SubplotsContainer.__getitem__(key)[source]

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

Example

>>> import proplot as plot
>>> fig, 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