plot_spectra

sitelle.plot.plot_spectra(axis, spectrum, ax=None, wavenumber=True, **kwargs)

Helper function to plot a spectrum.

Parameters:
  • axis (1D ndarray) – the spectrum axis
  • spectrum (1D ndarray) – the spectrum to plot
  • ax (Axes) – (Optional) The matplotlib axes on which to plot. If None, a new one will be created.
  • wavenumber (bool, Default True) – (Optional) If True, the axis is in wavenumber ([cm-1]) else in wavelength ([Angstroms])
  • label (str) – (Optional) labels of the plot, to be displayed in the legend.
  • build_ax (bool, Default = False) – (Optional) Used to force the customization of the axes. Should be False if we plot a new spectrum on an existing plot.
  • kwargs (dict) – Additional keyword arguments passed to matplotlib.pyplot.plot() function
Returns:

  • fig (Figure) – The figure containing the plot.
  • ax (Axes) – The axes containing the plot.