diff --git a/pyglotaran_extras/plotting/plot_data.py b/pyglotaran_extras/plotting/plot_data.py index 84d2b2f2..7ca49654 100644 --- a/pyglotaran_extras/plotting/plot_data.py +++ b/pyglotaran_extras/plotting/plot_data.py @@ -4,6 +4,7 @@ from typing import cast import matplotlib.pyplot as plt +from glotaran.io.prepare_dataset import add_svd_to_dataset from matplotlib.axis import Axis from pyglotaran_extras.io.load_data import load_data @@ -58,6 +59,8 @@ def plot_data_overview( dataset.data.plot(x="time", ax=data_ax, center=False) else: dataset.data.plot(ax=data_ax) + + add_svd_to_dataset(dataset=dataset, name="data") plot_lsv_data(dataset, lsv_ax) plot_sv_data(dataset, sv_ax) plot_rsv_data(dataset, rsv_ax) diff --git a/pyglotaran_extras/plotting/plot_svd.py b/pyglotaran_extras/plotting/plot_svd.py index be955577..95485b4e 100644 --- a/pyglotaran_extras/plotting/plot_svd.py +++ b/pyglotaran_extras/plotting/plot_svd.py @@ -2,6 +2,8 @@ from typing import TYPE_CHECKING +from glotaran.io.prepare_dataset import add_svd_to_dataset + from pyglotaran_extras.plotting.style import PlotStyle if TYPE_CHECKING: @@ -20,9 +22,11 @@ def plot_svd( linthresh: float = 1, cycler: Cycler = PlotStyle().cycler, ) -> None: + add_svd_to_dataset(dataset=res, name="singular") plot_lsv_residual(res, axes[0, 0], linlog=linlog, linthresh=linthresh, cycler=cycler) plot_rsv_residual(res, axes[0, 1], cycler=cycler) plot_sv_residual(res, axes[0, 2], cycler=cycler) + add_svd_to_dataset(dataset=res, name="data") plot_lsv_data(res, axes[1, 0], linlog=linlog, linthresh=linthresh, cycler=cycler) plot_rsv_data(res, axes[1, 1], cycler=cycler) plot_sv_data(res, axes[1, 2], cycler=cycler)