SubplotsContainer.__getattr__

SubplotsContainer.__getattr__(attr)[source]

If the attribute is callable, return a dummy function that loops through each identically named method, calls them in succession, and returns a tuple of the results. This lets us call arbitrary methods on several axes at once. If the SubplotsContainer has length 1, the single result is returned. If the attribute is not callable, returns a tuple of attributes for every object in the list.

Example

>>> import proplot as plot
>>> fig, axs = plot.subplots(nrows=2, ncols=2)
>>> axs.format(...)  # calls "format" on all subplots
>>> panels = axs.panel_axes('right')  # returns SubplotsContainer of panels
>>> panels.format(...)  # calls "format" on all panels