PlasmaCalcs.plotting.plot_tools.lims.update_vlims

PlasmaCalcs.plotting.plot_tools.lims.update_vlims(values, d, *, in_place=False)
calculate vmin, vmax of values, and return copy of d updated appropriately.
values: array-like or list of array-like objects
the values to use for calculating the vlims.
if list of array-like objects, the array-like objects may be of different shapes.
d: dict which may have keys ‘vmin’, ‘vmax’, and/or ‘robust’, indicating:
vmin, vmax: None or value
if provided, use this value for vmin, vmax. Otherwise, calculate it.
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).

Note: the ‘robust’ key will be popped from the result.
in_place: bool, default False
whether to perform the operation in place. True –> edit d directly.