From 16a745734f9ee96dcc46bad84112adef4b93d382 Mon Sep 17 00:00:00 2001 From: Kyle Ma Date: Thu, 3 Jul 2025 09:59:50 -0400 Subject: [PATCH 1/2] fix colorfill normalisation crashing mantid --- Framework/PythonInterface/mantid/plots/mantidaxes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Framework/PythonInterface/mantid/plots/mantidaxes.py b/Framework/PythonInterface/mantid/plots/mantidaxes.py index a5132939c9fc..e9c3c4d7087a 100644 --- a/Framework/PythonInterface/mantid/plots/mantidaxes.py +++ b/Framework/PythonInterface/mantid/plots/mantidaxes.py @@ -1717,6 +1717,8 @@ def replace_data(self, workspace, plot_kwargs=None): :param plot_kwargs: Key word args to pass to plotting function """ if plot_kwargs: + if "specNum" in plot_kwargs: + del plot_kwargs["specNum"] new_artists = self._data_replace_cb(self._artists, workspace, plot_kwargs) else: new_artists = self._data_replace_cb(self._artists, workspace) From b43aac997668340b9d9a3c1afb9db5a12284096b Mon Sep 17 00:00:00 2001 From: Kyle Ma Date: Thu, 3 Jul 2025 10:04:53 -0400 Subject: [PATCH 2/2] only remove "specNum" if it's None --- Framework/PythonInterface/mantid/plots/mantidaxes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Framework/PythonInterface/mantid/plots/mantidaxes.py b/Framework/PythonInterface/mantid/plots/mantidaxes.py index e9c3c4d7087a..2418f51d1985 100644 --- a/Framework/PythonInterface/mantid/plots/mantidaxes.py +++ b/Framework/PythonInterface/mantid/plots/mantidaxes.py @@ -1717,7 +1717,7 @@ def replace_data(self, workspace, plot_kwargs=None): :param plot_kwargs: Key word args to pass to plotting function """ if plot_kwargs: - if "specNum" in plot_kwargs: + if "specNum" in plot_kwargs and plot_kwargs["specNum"] is None: del plot_kwargs["specNum"] new_artists = self._data_replace_cb(self._artists, workspace, plot_kwargs) else: