PlasmaCalcs.plotting.labels.xarray_suptitle_plot_node
- PlasmaCalcs.plotting.labels.xarray_suptitle_plot_node(array, base_text=UNSET, t=None, *, fig=None, parent=None, **kw)
- create a MoviePlotNode for a suptitle associated with an xarray.DataArray.
- array: xarray.DataArray, probably ndim=3.
- the full DataArray which will be plotted throughout the movie.internally, store xarray_fill_coords(array), so that coordless dims’ indices can be used.e.g. if “dim0” is a dimension with no coords, will use np.arange(dim0.size).
- base_text: UNSET or str
- the base text string, to be formatted by array at each frame.UNSET –> will use array._title_for_slice() for array at each frame.str –> will be formatted by xarray_nondim_coords(array at frame).E.g., base_text=’fluid={{fluid}}, time={{t:.2e}} seconds’.
- t: None or str
- the array dimension which frames will index. E.g. ‘time’.None –> infer it via infer_movie_dim(array.dims, t)
- parent: None or MoviePlotNode
- if provided, the parent of this node. None -> this node has no parent.
- suptitle_font: UNSET, None, or str (default: UNSET)
- font for suptitle, e.g. ‘serif’, ‘sans-serif’, or ‘monospace’UNSET –> use DEFAULTS.PLOT.MOVIE_TITLE_FONT (default: monospace).None –> use matplotlib default.
- suptitle_y: UNSET, None, or number (default: UNSET)
- y position for suptitle, in figure coordinates.
- suptitle_kw: UNSET, or dict (default: UNSET)
- any additional kwargs for plt.suptitle.
- text_kw: UNSET, None, or dict (default: UNSET)
- any additional kwargs for text, e.g. text_kw=dict(fontweight=bold).Applied to titles too, but individual kw can be overridden by title settings.[TODO] ability to enter unambiguous text_kw directly, e.g. fontweight.
Additional kwargs go directly to plt.suptitle()