subplot_grid¶
-
class
subplot_grid(objs, n=1, order='C')[source]¶ Bases:
listList subclass and pseudo-2D array that is used as a container for the list of axes returned by
subplots, lists of figure panels, and lists of stacked axes panels. The shape of the array is stored in theshapeattribute. See the__getattr__and__getitem__methods for details.- Parameters
objs (list-like) – 1D iterable of
Axesinstances.n (int, optional) – The length of the fastest-moving dimension, i.e. the number of columns when
orderis'C', and the number of rows whenorderis'F'. Used to treat lists as pseudo-2D arrays.order ({‘C’, ‘F’}, optional) – Whether 1D indexing returns results in row-major (C-style) or column-major (Fortran-style) order, respectively. Used to treat lists as pseudo-2D arrays.
Methods Summary
__getattr__(attr)If the attribute is callable, returns a dummy function that loops through each identically named method, calls them in succession, and returns a tuple of the results.
__getitem__(key)If an integer is passed, the item is returned, and if a slice is passed, an
subplot_gridof the items is returned.__setitem__(key, value)Pseudo immutability.