CADETProcess.solution.SolutionIO.plot_purity

CADETProcess.solution.SolutionIO.plot_purity#

SolutionIO.plot_purity(start: float | None = None, end: float | None = None, components: list[str] | None = None, x_axis_in_minutes: bool = True, plot_components_purity: bool = True, plot_species_purity: bool = False, alpha: float = 1.0, xlabel: str | None = None, ylim: tuple[float, float] | None = None, ylabel: str | None = None, hide_labels: bool = False, hide_species_labels: bool = False, show_legend: bool = True, update_layout: bool = True, ax: Axes | tuple[Axes] | None = None, setup_figure_kwargs: dict | None = None) tuple[Figure, Axes][source]#

Plot local purity for each component of the concentration profile.

Parameters:
startfloat | None, optional, default=None

Start time for plotting in seconds. If None, the first data point is used.

endfloat | None, optional, default=None

End time for plotting in seconds. If None, the last data point is used.

componentslist[str] | None, optional, default=None

List of components to be plotted. If None, all components are plotted.

x_axis_in_minutesbool, optional, default=True

If True, the x-axis is displayed in minutes instead of seconds.

plot_components_puritybool, optional

If True, plot purity of total component concentration. Default is True.

plot_species_puritybool, optional

If True, plot purity of individual species. Default is False.

alphafloat, default=1.0

Opacity of plotted lines.

ylimtuple[float, float] | None, default=None

Y-axis limits.

hide_labelsbool, default=False

If True, hide labels in the legend.

hide_species_labelsbool, default=False

If True, hide species labels in the legend.

secondary_axeslist[SecondaryAxis] | None, default=None

List of SecondaryAxis objects for secondary axes.

show_legendbool, default=True

If True, display the legend.

update_layoutbool, optional, default=True

If True, update layout.

axplt.Axes | tuple[plt.Axes] | None, default=None

Optional Matplotlib Axes. If not provided, a new figure is created.

setup_figure_kwargsdict | None, default=None

Additional options to setup the figure.

Returns:
tuple[plt.Figure, plt.Axes]

The Matplotlib Figure and Axes objects.

Raises:
CADETProcessError

If the solution has fewer than 2 components.