PlasmaCalcs.plotting.subplots_extensions.XarraySubplots
- class PlasmaCalcs.plotting.subplots_extensions.XarraySubplots(xarray, row=None, col=None, *, wrap=None, x=None, y=None, t=None, fig=None, vmin=None, vmax=None, robust=UNSET, share_vlims=False, title=UNSET, title_y=UNSET, suptitle=UNSET, suptitle_y=UNSET, aspect=UNSET, layout=UNSET, cax_mode=UNSET, axsize=UNSET, add_colorbars=True, **kw)
Bases:
MovieSubplotsgrid of subplots from xarray data. Can be animated as a movie!- xarray: xarray.DataArray or xarray.Dataset
- the array to plot. up to 5D (row, col, x, y, t).(Note that row & col dims should be “not too long” otherwise plot will be very large)if dataset, up to 4D; will be converted to DataArray with new dim named ‘variable’.internally, will store xarray_fill_coords(xarray) to utilize coordless dims’ indices in titles.
- row: None or str
- dimension to plot ACROSS rows.None –> subplots will have ncols=1 (nothing varies across a row –> only 1 column).E.g. if row==’fluid’, then the i’th COLUMN will be fluid i.[TODO] infer row directly from xarray, somehow?
- col: None or str
- dimension to plot DOWN columns.None –> subplots will have nrows=1 (nothing varies down a column –> only 1 row).E.g. if col==’component’, then the j’th ROW will be component j.
- wrap: None or int
- wrap row or col dimension after this many images.can only be provided if provided row or col but not both.E.g. if row==’fluid’, wrap=4, and input has 10 fluids, will make rows of 4, 4, 2 images.Any remaining “empty” plots will have their axes hidden.
- x, y: None or str
- dimension name for the x and y axes of an individual subplot.None –> infer from the xarray coords. See also: DEFAULTS.PLOT.DIMS_INFER
- t: None or str
- dimension name for the time axis (for movies).None –> infer from the xarray coords. See also: DEFAULTS.PLOT.DIMS_INFER
- vmin, vmax: None or value
- if provided, use this value for vmin, vmax for all subplots,and ignore share_vlims and robust.
- share_vlims: bool or str (‘all’, ‘row’, ‘col’) (default: False)
- whether to share vmin/vmax across ImageSubplots.True –> use ‘all’‘all’ –> share vlims across all image subplots.‘row’ –> share vlims across each row of image subplots.‘col’ –> share vlims across each column of image subplots.
- robust: UNSET, bool, or number between 0 and 50 (default: UNSET)
- use np.percentile when determining vmin/vmax, if robust.For imshow/image plots, this refers to colorbar lims; for line plots, this refers to y lims.UNSET –> use DEFAULTS.PLOT.ROBUST (default: True).False –> just use min and max of values, don’t use percentile.True –> use DEFAULTS.PLOT.ROBUST_PERCENTILE (default: 2.0)number –> use np.percentile with this percentile for vmin (and 100 - this percentile for vmax).
additional kwargs go to other places [TODO][DOC] fill in the details.To view or adjust plot settings in self, see self.plot_settings, or help(self.plot_settings).- __init__(xarray, row=None, col=None, *, wrap=None, x=None, y=None, t=None, fig=None, vmin=None, vmax=None, robust=UNSET, share_vlims=False, title=UNSET, title_y=UNSET, suptitle=UNSET, suptitle_y=UNSET, aspect=UNSET, layout=UNSET, cax_mode=UNSET, axsize=UNSET, add_colorbars=True, **kw)
Methods
__init__(xarray[, row, col, wrap, x, y, t, ...])add_child(child)ax_apply(f, *[, sca])ax_images(*[, fill_value])color_scheme_matches(im0, im1)colorbar([mappable, cax, ax, location, ...])colorbars([mode])colorbars_at([slice, sca, missing_ok, ...])colorbars_col(icol, **kw_colorbars_at)colorbars_row(irow, **kw_colorbars_at)display([show_depth, max_depth, shorthand])enumerate_flat(*[, include_self])find_mappable([ax, im])flat(*[, include_self])flat_branches_until(branches_until, *[, ...])get_animator(*[, fps, blit, frames, plt_close])get_data_at_frame(frame)grid(*args_grid, **kw_grid)help()html([show_depth, max_depth, shorthand])init_plots(*[, plotted_ok])iter_ax([slice, sca, restore, skip])iter_col(icol, *[, sca, restore])iter_row(irow, *[, sca, restore])make_child(obj)make_children(objs)remove_redundant_labels([which, ignore_empty])save(filename[, frames, fps, blit])sca(irow, icol)scatter_max(**kw_scatter)scatter_min(**kw_scatter)set_min_n_ticks([min_n_ticks])set_parent(parent, *[, _internal])set_updater(irow, icol, updater)subplots_adjust(**kw)subplots_figsize([nrows, ncols, axsize, ...])update_to_frame(frame)updaters(*[, fill_value])xlabel(xlabel[, mode, only])ylabel(ylabel[, mode, only])Attributes
DEFAULT_TREE_SHORTHANDDEFAULT_TREE_SHOW_DEPTHDEFAULT_TREE_SHOW_MAX_DEPTHaxes_class- add_child(child)
- adds this child (a Tree) to self.children. Also, child.set_parent(self).returns the added child.
- property ani
- alias to get_animator
- apply_misc_formatting()
- apply misc formatting according to self.plot_settings.
- ax_apply(f, *, sca=True)
- return numpy array of f(ax) applied to each ax. result has dtype=object.if sca, call plt.sca() before working on each ax.
- property ax_idx
- array of indices (irow, icol), with same shape as axs array, dtype=object
- ax_images(*, fill_value=None)
- return array of the image on each ax (or fill_value if no image on that ax).
- property axs
- array of axes objects.
- property cache_state
- int, associated with cached results.
- static color_scheme_matches(im0, im1)
- return whether color for im0 matches color scheme for im1
- static colorbar(mappable=None, *, cax=None, ax=None, location=None, size=None, pad=None, **kw_colorbar_here)
- create a colorbar, like plt.colorbar(), but using Colorbar class instead.
- mappable: None or mpl.cm.ScalarMappable
- the mappable for this colorbar.if None, attempt to find it using find_mappable(ax=ax, im=mappable).
- cax: None or axes object
- the axes for this colorbar.None –> use make_cax(…), or make cax using mpl_get_cax(…), depending on cax_mode.kwargs for make_cax would be:ax, location, sca, ticks_position, pad, size, **kw_add_axes.
- cax_mode: UNSET, ‘mpl’, ‘pc’ (default: UNSET)
- tells how to make a new axis for a colorbar if one was not provided.UNSET –> use DEFAULTS.PLOT.CAX_MODE (default: mpl).‘mpl’ –> use matplotlib logic, the same exact logic as in plt.colorbar.‘pc’ –> use PlasmaCalcs logic; it looks better when using layout=’none’,however ‘pc’ logic doesn’t play nicely with other layout options yet.
- location: None, ‘right’, ‘left’, ‘top’, or ‘bottom’
- location of colorbar relative to image.None –> use DEFAULTS.PLOT.CAX_LOCATION (default: right)also passed to super().__init__, so that orientation is set appropriately.
The following are relevant if cax not provided, and using cax_mode=’mpl’:- sca: bool (default False)
- whether to adjust the plt.gca() to cax.False –> plt.gca() will be unchanged by this operation.
- ticks_position: None (default), ‘right’, ‘left’, ‘top’, or ‘bottom’
- None -> ticks are on opposite side of colorbar from image.string -> use this value to set ticks position.
- pad: None or number (default 0.01)
- padding between cax and ax, as a percentage of ax size.None –> use DEFAULTS.PLOT.CAX_PAD (default: 0.01)
- size: None or number (default 0.02)
- size of colorbar, as a percentage of ax size.None –> use DEFAULTS.PLOT.CAX_SIZE (default: 0.02)
- kw_add_axes: dict
- passed to make_cax(…, **kw_add_axes)… which passes it to plt.gcf().add_axes().
additional kwargs get passed to matplotlib.colorbar.Colorbar.__init__.
- colorbars(mode='auto', **kw_colorbars_at)
- create colorbars for each image in self.
- mode: True, ‘auto’, ‘all’, ‘row’, slice, or tuple
- tells where to create the colorbars.True –> use mode=’auto’‘auto’ –> infer, by checking which images have equal im.get_clim() and im.cmap.For rows where all image subplots have the same clim and cmap, mode=’row’(unless the right-most in row has no image; then use mode=’all’).‘all’ –> each image gets its own colorbar.‘row’ –> each row gets its own colorbar, at the right-most image in the row.slice or tuple –> self.colorbars_at(slice, …)# [TODO] add ‘col’ option, for horizontal colorbars at top of columns.# [TODO] add ‘single’ option, for one tall colorbar on the right of figure.# [TODO] make_shared_cax() which makes a tall colorbar with same height as multiple axes.
- colorbars_at(slice=None, *, sca=False, missing_ok=True, iter_ax='all', location=None, ticks_position=None, pad=None, size=None, kw_add_axes={}, **kw_colorbar)
- create colorbars for each ax in self.iter_ax(slice), using self.colorbar(…).
- slice: None, int, slice, or tuple
- if provided, only include the axes from axs[slice].when in this mode, (irow, icol) will still correspond to self.axs[(irow, icol)],(not self.axs[slice][irow, icol]).
- sca: bool
- whether to set current axis to the last-created colorbar, after the operation is complete.False –> afterwards, plt.gca() will be restored to what it was before this operation began.
- missing_ok: bool
- whether it is okay for some axs to not have a mappable.
- iter_ax: ‘all’, ‘row’, or ‘col’
- which axes to iterate over.slice will be passed to the appropriate iter func. E.g. ‘row’ –> iter_row(slice, …)
The remaining kwargs go to self.colorbar(…):- location: None, ‘right’, ‘left’, ‘top’, or ‘bottom’
- location of colorbar relative to image.None –> use DEFAULTS.PLOT.CAX_LOCATION (default: right)
- ticks_position: None (default), ‘right’, ‘left’, ‘top’, or ‘bottom’
- None -> ticks are on opposite side of colorbar from image.string -> use this value to set ticks position.
- pad: None or number (default 0.01)
- padding between cax and ax, as a percentage of ax size.None –> use DEFAULTS.PLOT.CAX_PAD (default: 0.01)
- size: None or number (default 0.02)
- size of colorbar, as a percentage of ax size.None –> use DEFAULTS.PLOT.CAX_SIZE (default: 0.02)
- kw_add_axes: dict
- passed to make_cax(…, **kw_add_axes)… which passes it to plt.gcf().add_axes().
- colorbars_col(icol, **kw_colorbars_at)
- create colorbars for each ax in column icol, using self.colorbars_at(…).Equivalent to self.colorbars_at(icol, iter_ax=’col’, …)
- colorbars_row(irow, **kw_colorbars_at)
- create colorbars for each ax in row irow, using self.colorbars_at(…).Equivalent to self.colorbars_at(irow, iter_ax=’row’, …)
- property depth
- number of layers above self. (parent, parent’s parents, etc.)depth = 0 for the node with parent = None.
- display(show_depth=None, max_depth=None, *, shorthand=None)
- display self in html. Includes self.html() and DEFAULTS.TREE_CSS.
- show_depth: None or int
- max number of layers of tree to show by default (i.e. “not hidden” by default)None –> use self.DEFAULT_TREE_SHOW_DEPTH if defined else DEFAULTS.TREE_SHOW_DEPTH
- max_depth: None or int
- max number of layers of tree to render (even if all layers are “not hidden”).Anything deeper will not be converted to html string.None –> use self.DEFAULT_TREE_SHOW_MAX_DEPTH if defined else DEFAULTS.TREE_SHOW_MAX_DEPTH
- shorthand: None or bool
- whether to use shorthand for the “Tree([depth=N, height=N, size=N], obj=…)” part of the repr.True –> use shorthand; replace that^ with: “((N, N, N)) …”None –> use self.DEFAULT_TREE_SHORTHAND if defined else DEFAULTS.TREE_SHORTHAND
- enumerate_flat(*, include_self=False)
- returns a generator which iterates over all of self’s descendants, in depth-first order,yielding (index, node) pairs, such that self[index] == node.Note that index will be a tuple with length == node.depth.if include_self, yield self first, as: ((), self)).
- property fig
- the Figure on which self is / will be plotted.
- static find_mappable(ax=None, *, im=None)
- return the relevant mappable. By default, return plt.gci().if plt.gci() is None, instead attempt to find a mappable on plt.gca();if there is exactly 1, return it, else raise PlottingError.the error will be MappableNotFoundError if 0, else PlottingAmbiguityError.providing im uses im instead of plt.gci()providing ax using ax instead of plt.gca() (only if didn’t provide im)
- ax: None or axes object
- if provided, use ax.findobj to find mappable.(cannot provide both ax and im)if None, check plt.gci() first, then use findobj if that is also None.
- im: None or mappable.
- if provided, return it.if None, attempt plt.gci(); returning it if that is not None
- flat(*, include_self=False)
- returns a generator which iterates over all of self’s descendants, in depth-first order.if include_self, yield self first.
- flat_branches_until(branches_until, *, include_self=False)
- returns a generator which iterates over all of self’s descendants, in depth-first order,but stop looking at descendants on a branch as soon as branches_until(node).E.g. self.flat_branches_until(lambda node: node.obj==7) will be similar to flat,but won’t go to any descendants for any node with obj==7.if include self, yield self first, and check branches_until(self) before continuing.otherwise, never check branches_until(self).
- property frame
- the currently-plotted frame
- property frames
- the frames that could be in the movie.if set to None, will use self.get_nframes() instead.if set to a slice, will use range(self.get_nframes())[frames] instead.
- get_animator(*, fps=UNSET, blit=UNSET, frames=UNSET, plt_close=True, **kw_func_animation)
- returns FuncAnimation instance using self as func.Use kwarg defaults from self.plot_settings, for any kwargs not provided here.
- fps: UNSET, None, or number (default: UNSET)
- frames per second.UNSET –> use DEFAULTS.PLOT.FPS (default: 30).(Or use value from self.plot_settings, if provided.)None –> use matplotlib defaults.
- blit: UNSET, None, or bool (default: UNSET)
- whether to use blitting.UNSET –> use DEFAULTS.PLOT.BLIT (default: True).(Or use value from self.plot_settings, if provided.)if None, use matplotlib defaults.
- frames: UNSET, None, int, iterable, or slice (default: UNSET)
- passed to FuncAnimation. Tells number of frames or which frames to plot.If UNSET, use value from self.plot_settings if possible else getattr(self, ‘frames’, None).if slice, use range(self.get_nframes())[frames], crashing if self doesn’t have ‘get_nframes’.
- plt_close: bool
- whether to plt.close() before returning the result.This is useful in Jupyter, where commonly one cell might make a plot,then call get_animator() to display movie in-line, but not plt.close().In that case, plt_close=False would display animation & plot
[TODO] use init_func kwarg to avoid calling self twice for frame 0?
- get_data_at_frame(frame)
- return dict of data for the given frame, to be used by the MoviePlotElement at self.obj.
- get_nframes()
- return max of get_nframes_here() for self & all descendants of self.If any node throws PlottingNframesUnknownError, pretend they said nframes=0.If all nodes throw PlottingNframesUnknownError, raise the one from self.
- get_nframes_here()
- return the number of frames that could be in the movie, based on this node.
- grid(*args_grid, **kw_grid)
- ax.grid(…) on all axs
- property height
- number of layers below self. (children, children’s children, etc.)height = 0 for a node with no children.
- classmethod help()
- prints a helpful message with examples for how to use this cls
- hide_empty_axes()
- hide axes (ax.set_visible(False)) without any data (check via ax.has_data())
- html(show_depth=None, max_depth=None, *, shorthand=None)
- returns html for displaying self and all of self’s children.
- show_depth: None or int
- max number of layers of tree to show by default (i.e. “not hidden” by default)None –> use self.DEFAULT_TREE_SHOW_DEPTH if defined else DEFAULTS.TREE_SHOW_DEPTH
- max_depth: None or int
- max number of layers of tree to render (even if all layers are “not hidden”).Anything deeper will not be converted to html string.None –> use self.DEFAULT_TREE_SHOW_MAX_DEPTH if defined else DEFAULTS.TREE_SHOW_MAX_DEPTH
- shorthand: None or bool
- whether to use shorthand for the “Tree([depth=N, height=N, size=N], obj=…)” part of the repr.True –> use shorthand; replace that^ with: “((N, N, N)) …”None –> use self.DEFAULT_TREE_SHORTHAND if defined else DEFAULTS.TREE_SHORTHAND
- property image0
- top-left image; images[0,0].
- property images
- alias to nodes
- init_plot()
- plot for the first time: call init_plot on all nodes,and organize into a nice tree structure which can be indexed like an array.This is fundamentally different from MoviePlotNode.init_plot’s usual purpose,since this is about calling init_plot on the nodes, not on self.obj.[TODO] should this function be renamed, for clarity?
- init_plots(*, plotted_ok=True)
- init_plot for self & all descendants with non-None obj.
- plotted_ok: bool
- True –> skip node if node.plotted.False –> call init_plot on all nodes with non-None obj.
- property isels
- np.array (dtype=object) of (None or dict of index details), one for each subplot.E.g. full_array.isel(self.isels[1,4]) == self.images[1,4].array.
- iter_ax(slice=None, *, sca=True, restore=True, skip=None)
- iterate over axs, one at a time, yielding ((irow, icol), ax) for each ax.
- slice: None, int, slice, or tuple
- if provided, only include the axes from axs[slice].when in this mode, (irow, icol) will still correspond to self.axs[(irow, icol)],(not self.axs[slice][irow, icol]).
- sca: bool
- if True, call plt.sca(ax) before yielding each ax.
- restore: bool
- if True, restore original plt.gca() after iteration is stopped.
- skip: None or callable of ((irow, icol), ax) –> bool
- if provided, skip axes for which skip(irow, icol, ax) returns True.
- iter_col(icol, *, sca=True, restore=True, **kw_iter_ax)
- iterate over axs in column icol, yielding ((irow, icol), ax) for each ax. See also: self.iter_ax
- icol: int or slice
- column index(es) to iterate over. Can be negative int, e.g. -1 will be the rightmost column.
boolif True, call plt.sca(ax) before yielding each ax.boolif True, restore original plt.gca() after iteration is stopped.
- iter_row(irow, *, sca=True, restore=True, **kw_iter_ax)
- iterate over axs in row irow, yielding ((irow, icol), ax) for each ax. See also: self.iter_ax
- irow: int or slice
- row index(es) to iterate over. Can be negative int, e.g. -1 will be the bottom row.
boolif True, call plt.sca(ax) before yielding each ax.boolif True, restore original plt.gca() after iteration is stopped.
- make_child(obj)
- makes a child of self, with obj as its stored object, and returns the child.
- make_children(objs)
- make_child(obj) for obj in objs; returns the list of newly made children.
- property ncols
- number of columns in axs array.
- property nrows
- number of rows in axs array.
- property parent
- parent node of self. None if self is root.When set to a value, calls self.set_parent(value),which also updates tracking info appropriately, and updates parent’s children.
- property parent_ref
- stores parent value, but internally uses weakref to avoid circular references.Users should always use self.parent instead.
- plot_suptitle()
- adds suptitle (as a MovieText node)raise PlottingAmbiguityError if suptitle already plotted(this prevents having multiple suptitle nodes).
- property plotted
- whether this node’s element has actually been plotted yet.False before init_plot; True after. Always None if self.obj is None.
- property plotted_data
- the currently plotted data.
- remove_redundant_labels(which=['x', 'y'], *, ignore_empty=True)
- remove labels which are redundant, e.g. ticklabels,ylabels except in left col, xlabels except in bottom row.if sharexlike=False or shareylike=False, will not remove the corresponding labels.if self.plot_settings[‘polar’], keep xticklabels (i.e. angles) on top row instead of bottom.
- which: iterable of str in (‘x’, ‘y’)
- which labels to remove. Default: (‘x’, ‘y’)
- ignore_empty: bool
- whether to ignore empty axes (checked via ax.has_data())
- save(filename, frames=UNSET, *, fps=UNSET, blit=UNSET, **kw)
- save the movie to filename.RECOMMENDED:first, self.save(…, frames=N), with small N (e.g. N=5), to test movie formatting.
- Troubleshooting: if movie getting cut off,
- try plt.subplots_adjust(bottom=0.2, left=0.2, right=0.8, top=0.8),or even more extreme values if necessary. (0 is bottom/left edge; 1 is top/right edge.)
- frames: UNSET, None, int, iterable, or slice (default: UNSET)
- passed to FuncAnimation. Tells number of frames or which frames to plot.If UNSET, use value from self.plot_settings if possible else getattr(self, ‘frames’, None).if slice, use range(self.get_nframes())[frames], crashing if self doesn’t have ‘get_nframes’.
- fps: UNSET, None, or number (default: UNSET)
- frames per second.UNSET –> use DEFAULTS.PLOT.FPS (default: 30).(Or use value from self.plot_settings, if provided.)None –> use matplotlib defaults.
- blit: UNSET, None, or bool (default: UNSET)
- whether to use blitting.UNSET –> use DEFAULTS.PLOT.BLIT (default: True).(Or use value from self.plot_settings, if provided.)if None, use matplotlib defaults.
additional kwargs passed to FuncAnimation() or FuncAnimation.save().returns abspath of the saved movie.
- sca(irow, icol)
- set current axis to self.axs[irow, icol]
- scatter_max(**kw_scatter)
- plt.scatter() to draw a single marker in each subplot, at the argmax of each subplot’s array.[TODO] animatable, non-static marker (as child nodes of each image in self)Here just loops through each image in self.images, calling image.scatter_max().returns np.array with same shape as self, containing the results of plt.scatter() calls.
- scatter_min(**kw_scatter)
- plt.scatter() to draw a single marker in each subplot, at the argmin of each subplot’s array.[TODO] animatable, non-static marker (as child nodes of each image in self)Here just loops through each image in self.images, calling image.scatter_min().returns np.array with same shape as self, containing the results of plt.scatter() calls.
- set_min_n_ticks(min_n_ticks=UNSET)
- set_min_n_ticks on all axs.Use min_n_ticks from self.plot_settings if not provided here.
- set_parent(parent, *, _internal=False)
- sets self.parent = parent. Also, parent.add_child(self), unless _internal=True.Users should use self.parent = parent instead of calling set_parent directly.
- set_updater(irow, icol, updater)
- set updater on ax[irow, icol] to updater
- property shape
- shape of axs array, as (nrows, ncols).
- property size
- number of nodes in this tree. (here and below)size = 1 for a node with no children.
- subplots_adjust(**kw)
- plt.subplots_adjust, using values from self.plot_settings by default.
Note: adjusts the parameters for self.fig, not necessarily plt.gcf().
plt.subplots_adjust docs:————————-<function subplots_adjust at 0x727be9461ee0>
- static subplots_figsize(nrows=1, ncols=1, axsize=None, *, left=None, right=None, bottom=None, top=None, wspace=None, hspace=None)
- returns figsize to use for subplots so that every subplot has size axsize.
- axsize: None, number, or (width, height)
- size of a single subplot, in inches.if None, use DEFAULTS.PLOT.SUBPLOTS_AXSIZE.if number, use width=height=axsize.
- left, right, bottom, top, wspace, hspace: None or number (probably between 0 and 1)
- corresponding value that will be used during plt.subplots_adjust;figsize must be adjust accordingly to account for whitespace between and around subplots.None –> plt.rcParams[‘figure.subplot.left’], plt.rcParams[‘figure.subplot.right’], etc.left, right, bottom, top: tell position of edge of subplots grid, as fraction of figure width / height.wspace, hspace: tell width of padding between subplots, as fraction of axsize width / height.
- property t_plot_dim
- alias to self.image0.t_plot_dim
- update_to_frame(frame)
- update the plot for the given frame. set self.frame=frame.also calls update_to_frame for all children.return iterable of all updated artists.
- updaters(*, fill_value=None)
- return array of updaters for each ax (or fill_value if no updater on that ax).
- property x_plot_dim
- alias to self.image0.x_plot_dim
- xlabel(xlabel, mode=None, *, only=True, **kw)
- set xlabel on relevant axs, or as supxlabel.
- mode: None or str in (‘edge’, ‘all’, ‘sup’)
- None –> use self.xlabel_mode‘edge’ –> only set xlabel on axs in bottom row‘all’ –> set xlabel on all axs.‘sup’ –> set xlabel on self.fig, as supxlabel.
- only: bool, default True
- if only, then also set xlabel to ‘’ on all other axes.
kwargs are passed to ax.set_xlabel or fig.supxlabel, as appropriate.
- property y_plot_dim
- alias to self.image0.y_plot_dim
- ylabel(ylabel, mode=None, *, only=True, **kw)
- set ylabel on relevant axs, or as supylabel.
- mode: None or str in (‘edge’, ‘all’, ‘sup’)
- None –> use self.xlabel_mode‘all’ –> set ylabel on all axs.‘sup’ –> set ylabel on self.fig, as supylabel.
- only: bool, default True
- if only, then also set ylabel to ‘’ on all other axes.
kwargs are passed to ax.set_ylabel or fig.supylabel, as appropriate.