Plotter
multi_absolute.py
Module to plot multiple absolute spectra.
- class MultiAbsolutePlotter(spectra, sampling, show_plot, output_path, output_file, _format, legend, save_file)[source]
Bases:
Plotter
multi_xp.py
Module to plot multiple XP spectra.
- class MultiXpPlotter(spectra, sampling, show_plot, output_path, output_file, _format, legend, save_file)[source]
Bases:
Plotter
plot_spectra.py
Module to plot spectra.
- plot_spectra(spectra: DataFrame, sampling: ndarray | None = None, multi: bool = False, show_plot: bool = True, output_path: Path | str | None = None, output_file: str | None = None, format: str | None = None, legend: bool = True)[source]
Plot one or more spectra.
- Parameters:
spectra (DataFrame) – DataFrame of spectra to be plotted.
sampling (ndarray) – Sampling used to create the spectra.
multi (bool) – Generate a multiple subplots. Default value of False plots each spectrum in its own figure. If True, errors will not be plotted.
show_plot (bool) – Show plots if True.
output_path (str) – Path to the directory where the figures will be saved. E.g.: ‘/home/user/folder’
output_file (str) – Name of the output file without extension (e.g. ‘my_plot’).
format (str) – File format for the saved figure. Defaults to ‘jpg’.
legend (bool) – Print legend. Valid only if multi is True.
plotter.py
Module to create a plotter object.
- class Plotter(spectra, sampling, show_plot, output_path, output_file, _format, legend, save_file)[source]
Bases:
object
single.py
Module to plot a single spectrum, either absolute or XP.