From a278976d23d2c00360d03ab8c3420caeea7f940f Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@gmail.com> Date: Mon, 14 Jan 2019 08:58:46 +0000 Subject: [PATCH] Forward *args in MantidAxes.plot command Refs #24000 --- Framework/PythonInterface/mantid/plots/plotfunctions.py | 2 +- .../test/python/mantid/plots/plots__init__Test.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Framework/PythonInterface/mantid/plots/plotfunctions.py b/Framework/PythonInterface/mantid/plots/plotfunctions.py index 9b6a273d5cf..b9536385281 100644 --- a/Framework/PythonInterface/mantid/plots/plotfunctions.py +++ b/Framework/PythonInterface/mantid/plots/plotfunctions.py @@ -133,7 +133,7 @@ def plot(axes, workspace, *args, **kwargs): dimension """ x, y, args, kwargs = _plot_impl(axes, workspace, args, kwargs) - return axes.plot(x, y, **kwargs) + return axes.plot(x, y, *args, **kwargs) def errorbar(axes, workspace, *args, **kwargs): diff --git a/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py b/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py index 40b4475d1dc..041e807df18 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py +++ b/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py @@ -47,7 +47,8 @@ class Plots__init__Test(unittest.TestCase): self.fig, self.ax = None, None def test_line2d_plots(self): - self.ax.plot(self.ws2d_histo, specNum=2, linewidth=6) + self.ax.plot(self.ws2d_histo, 'rs', specNum=2, linewidth=6) + self.assertEqual('r', self.ax.lines[-1].get_color()) self.ax.plot(np.arange(10), np.arange(10), 'bo-') def test_errorbar_plots(self): -- GitLab