scipp.plot(obj, aspect='auto', cbar=True, crop=None, errorbars=True, grid=False, ignore_size=False, mask_color='black', norm='linear', scale=None, title=None, vmin=None, vmax=None, **kwargs)#

Plot a Scipp object.

  • obj (Union[Variable, DataArray, Dataset, ndarray, Dict[str, Union[Variable, DataArray, Dataset, ndarray]]]) – 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.

  • crop (Optional[Dict[str, Dict[str, Variable]]], default: None) – Set the axis limits. Limits should be given as a dict with one entry per dimension to be cropped. Each entry should be a nested dict containing scalar values for 'min' and/or 'max'. Example: da.plot(crop={'time': {'min': 2 * sc.Unit('s'), 'max': 40 * sc.Unit('s')}})

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

  • 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 (Optional[Variable], default: None) – Lower bound for data to be displayed (y-axis for 1d plots, colorscale for 2d plots).

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

  • **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


A figure.