From c32c50d0c8f201e5159fdf15748a649a9fe4b364 Mon Sep 17 00:00:00 2001 From: Jonathan Haigh Date: Tue, 17 Sep 2024 09:58:10 +0100 Subject: [PATCH] add simple test --- .../test/python/mantid/plots/axesfunctionsTest.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Framework/PythonInterface/test/python/mantid/plots/axesfunctionsTest.py b/Framework/PythonInterface/test/python/mantid/plots/axesfunctionsTest.py index d9c6bfad2cca..740353633dcf 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/axesfunctionsTest.py +++ b/Framework/PythonInterface/test/python/mantid/plots/axesfunctionsTest.py @@ -45,6 +45,12 @@ def setUpClass(cls): VerticalAxisValues=[4, 6, 8], OutputWorkspace="ws2d_histo", ) + cls.ws2d_histo_negative_errors = CreateWorkspace( + DataX=[1, 2, 3, 4], + DataY=[10, 20, 30, 40], + DataE=[1, -2, 3, -4], + OutputWorkspace="ws2d_histo_negative_errors" + ) cls.ws2d_histo_non_dist = CreateWorkspace( DataX=[10, 20, 30, 10, 20, 30], DataY=[2, 3, 4, 5], @@ -151,6 +157,10 @@ def test_1d_errorbars(self): funcs.errorbar(ax, self.ws2d_histo, specNum=2, linewidth=6) funcs.errorbar(ax, self.ws_MD_1d, "bo") + def test_1d_errorbars_with_negative_errors(self): + _, ax = plt.subplots() + funcs.errorbar(ax, self.ws2d_histo_negative_errors, specNum=1) + def test_1d_scatter(self): fig, ax = plt.subplots() funcs.scatter(ax, self.ws2d_histo, specNum=1)