spectrochempy.plot_multiple

plot_multiple(datasets, method='scatter', pen=True, labels=None, marker='AUTO', color='AUTO', ls='AUTO', lw=1, shift=0, **kwargs)[source]

Overlay several 1D datasets on a single Matplotlib axes.

Parameters:
  • datasets (list of 1D NDDataset) – Datasets to plot. If a single dataset is passed, plot_multiple() falls back to the regular dataset.plot() path and preserves the requested method.

  • method (str among [scatter, pen]) – Geometry to use for each overlaid dataset. "scatter" produces marker-based rendering; "pen" produces line rendering.

  • pen (bool, optional, default: True) – If method="scatter", also draw connecting lines between markers.

  • labels (a list of str, optional) – Labels used for the legend. The length of the list must match the number of datasets to plot.

  • marker (str, list` os str or AUTO, optional, default: β€˜AUTO’) – Marker type for scatter plot. If marker is not provided then the scatter type of plot is chosen automatically.

  • color (str, list` os str or AUTO, optional, default: β€˜AUTO’) – Color of the lines. If color is not provided then the color of the lines is chosen automatically.

  • ls (str, list os str or AUTO, optional, default: β€˜AUTO’) – Line style definition. If ls is not provided then the line style is chosen automatically.

  • lw (float, list`of  `floats, optional, default: 1.0) – Line width. If lw is not provided then the line width is chosen automatically.

  • shift (float, list`of  `floats, optional, default: 0.0) – Vertical shift of the lines.

  • **kwargs – Other parameters passed to the underlying 1D plotting calls. Common aliases such as lw, ls, ms, mew, and c are normalized internally before rendering.

Returns:

matplotlib.axes.Axes – The shared axes containing the overlaid datasets.

Examples using spectrochempy.plot_multiple

Integrate a baseline-corrected IR band

Integrate a baseline-corrected IR band

Using plot_multiple to plot several datasets on the same figure

Using plot_multiple to plot several datasets on the same figure

Introduction to the plotting library

Introduction to the plotting library