plopp.inspector#

plopp.inspector(obj, dim=None, *, operation='sum', orientation='horizontal', cbar=True, **kwargs)[source]#

Inspector takes in a three-dimensional input and applies a reduction operation ('sum' by default) along one of the dimensions specified by dim. It displays the result as a two-dimensional image. In addition, an ‘inspection’ tool is available in the toolbar which allows to place markers on the image which perform slicing at that position to retain only the third dimension and displays the resulting one-dimensional slice on the right hand side figure.

Controls: - Click to make new point - Drag existing point to move it - Middle-click to delete point

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

  • dim (Optional[str], default: None) – The dimension along which to apply the reduction operation. This will also be the dimension that remains in the one-dimensional slices generated by adding markers on the image. If no dim is provided, the last (inner) dim of the input data will be used.

  • operation (Literal['sum', 'mean', 'min', 'max'], default: 'sum') – The operation to apply along the third (undisplayed) dimension specified by dim.

  • orientation (Literal['horizontal', 'vertical'], default: 'horizontal') – Display the two panels side-by-side (‘horizontal’) or one below the other (‘vertical’).

  • cbar (bool, default: True) – Show a colorbar on the image.

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

Returns:

A Box which will contain two Figure and one slider widget.