plopp.plot#

plopp.plot(obj, *, aspect='auto', cbar=True, coords=None, errorbars=True, figsize=None, grid=False, ignore_size=False, mask_color='black', norm='linear', scale=None, title=None, vmin=None, vmax=None, autoscale='auto', legend=True, **kwargs)[source]#

Plot a Scipp object.

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

  • aspect (Literal['auto', 'equal'], default: 'auto') – Aspect ratio for the axes.

  • cbar (bool, default: True) – Show colorbar in 2d plots if True.

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

  • errorbars (bool, default: True) – Show errorbars in 1d plots if True.

  • figsize (Optional[Tuple[float, float]], default: None) – The width and height of the figure, in inches.

  • grid (bool, default: False) – Show grid if True.

  • ignore_size (bool, default: False) – If True, skip the check that prevents the rendering of very large data objects.

  • mask_color (str, default: 'black') – Color of masks in 1d plots.

  • norm (Literal['linear', 'log'], default: 'linear') – Set to 'log' for a logarithmic y-axis (1d plots) or logarithmic colorscale (2d plots).

  • scale (Optional[Dict[str, str]], default: None) – Change axis scaling between log and linear. For example, specify scale={'tof': 'log'} if you want log-scale for the tof dimension.

  • title (Optional[str], default: None) – The figure title.

  • vmin (Union[Variable, int, float, None], default: None) – Lower bound for data to be displayed (y-axis for 1d plots, colorscale for 2d plots).

  • vmax (Union[Variable, int, float, None], default: None) – Upper bound for data to be displayed (y-axis for 1d plots, colorscale for 2d plots).

  • autoscale (Literal['auto', 'grow'], default: 'auto') – The behavior of the axis (1d plots) or the color range limits (2d plots). If auto, the limits automatically adjusts every time the data changes. If grow, the limits are allowed to grow with time but they do not shrink.

  • legend (Union[bool, Tuple[float, float]], default: True) – Show legend if True. If legend is a tuple, it should contain the (x, y) coordinates of the legend’s anchor point in axes coordinates.

  • **kwargs

    All other kwargs are directly forwarded to Matplotlib, the underlying plotting library. The underlying functions called are the following:

    • 1d data with a non bin-edge coordinate: plot

    • 1d data with a bin-edge coordinate: step

    • 2d data: pcolormesh

Returns:

FigureLike – A figure.