plopp.slicer#

plopp.slicer(obj, *, keep=None, autoscale=True, coords=None, vmin=None, vmax=None, cbar=True, enable_player=False, **kwargs)[source]#

Plot a multi-dimensional object by slicing one or more of the dimensions. This will produce one slider per sliced dimension, below the figure.

Parameters:
  • obj (Variable | DataArray | Dataset | DataGroup[Any] | ndarray | Node | dict[str, Variable | DataArray | Dataset | DataGroup[Any] | ndarray | Node]) – The object to be plotted.

  • keep (Optional[list[str]], default: None) – The dimensions to be kept, all remaining dimensions will be sliced. This should be a list of dims. If no dims are provided, the last dim will be kept in the case of a 2-dimensional input, while the last two dims will be kept in the case of higher dimensional inputs.

  • autoscale (bool, default: True) – Automatically adjust range of the y-axis (1d plots) or color scale (2d plots) every time the data changes if True.

  • coords (Optional[list[str]], default: None) – If supplied, use these coords instead of the input’s dimension coordinates.

  • vmin (Union[Variable, DataArray, Dataset, DataGroup[Any], float, None], default: None) – The minimum value of the y-axis (1d plots) or color range (2d plots).

  • vmax (Union[Variable, DataArray, Dataset, DataGroup[Any], float, None], default: None) – The maximum value of the y-axis (1d plots) or color range (2d plots).

  • cbar (bool, default: True) – Whether to display a colorbar for 2D plots.

  • enable_player (bool, default: False) –

    Add a play button to animate the sliders if True. Defaults to False.

    Added in version 25.07.0.

  • **kwargs – See plopp.plot() for the full list of figure customization arguments.

Return type:

FigureLike