plopp.superplot#
- plopp.superplot(obj, keep=None, *, aspect=None, autoscale=True, coords=None, enable_player=False, errorbars=True, figsize=None, grid=False, legend=True, logx=None, logy=None, mask_color='black', norm=None, scale=None, title=None, vmax=None, vmin=None, xlabel=None, xmax=None, xmin=None, ylabel=None, ymax=None, ymin=None, **kwargs)[source]#
Plot a multi-dimensional object as a one-dimensional line, slicing all but one dimension. This will produce one slider per sliced dimension, below the figure. In addition, a tool for saving the currently displayed line is added on the right hand side of the figure.
- Parameters:
obj (
Variable
|DataArray
|Dataset
|DataGroup
[Any
] |ndarray
|Node
) – The object to be plotted.keep (
str
|None
, default:None
) – The single dimension to be kept, all remaining dimensions will be sliced. This should be a single string. If no dim is provided, the last/inner dim will be kept.aspect (
Literal
['auto'
,'equal'
,None
], default:None
) – Aspect ratio for the axes.autoscale (
bool
, default:True
) – Automatically scale the axes/colormap ifTrue
.coords (
list
[str
] |None
, default:None
) – If supplied, use these coords instead of the input’s dimension coordinates.enable_player (
bool
, default:False
) – IfTrue
, add a play button to the sliders to automatically step through the slices.errorbars (
bool
, default:True
) – Show errorbars in 1d plots ifTrue
.figsize (
tuple
[float
,float
] |None
, default:None
) – The width and height of the figure, in inches.grid (
bool
, default:False
) – Show grid ifTrue
.legend (
bool
|tuple
[float
,float
], default:True
) – Show legend ifTrue
. Iflegend
is a tuple, it should contain the(x, y)
coordinates of the legend’s anchor point in axes coordinates.logx (
bool
|None
, default:None
) – IfTrue
, use logarithmic scale for x-axis.logy (
bool
|None
, default:None
) – IfTrue
, use logarithmic scale for y-axis.mask_color (
str
, default:'black'
) – Color of masks in 1d plots.norm (
Literal
['linear'
,'log'
,None
], default:None
) – Set to'log'
for a logarithmic y-axis. Legacy, preferlogy
instead.scale (
dict
[str
,str
] |None
, default:None
) – Change axis scaling betweenlog
andlinear
. For example, specifyscale={'time': 'log'}
if you want log-scale for thetime
dimension. Legacy, preferlogx
instead.vmax (
Variable
|float
|None
, default:None
) – Upper limit for data to be displayed (y-axis). Legacy, preferymax
instead.vmin (
Variable
|float
|None
, default:None
) – Lower limit for data to be displayed (y-axis). Legacy, preferymin
instead.xmax (
Variable
|float
|None
, default:None
) – Upper limit for x-axis.xmin (
Variable
|float
|None
, default:None
) – Lower limit for x-axis.ymax (
Variable
|float
|None
, default:None
) – Upper limit for y-axis.ymin (
Variable
|float
|None
, default:None
) – Lower limit for y-axis.**kwargs – Additional arguments forwarded to the underlying plotting library.
- Returns:
FigureLike
– Awidgets.Box
which will contain agraphics.FigLine
, slider widgets and a tool to save/delete lines.