From 706cfc168ca66929ee6eba153f2a1ff5b6ab7b85 Mon Sep 17 00:00:00 2001
From: Conor Finn <conor.finn@stfc.ac.uk>
Date: Thu, 26 Mar 2020 13:00:37 +0000
Subject: [PATCH] RE #28227 Add test for ragged colourfill creation

---
 qt/python/mantidqt/plotting/test/test_functions.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/qt/python/mantidqt/plotting/test/test_functions.py b/qt/python/mantidqt/plotting/test/test_functions.py
index 6dcd7c66a00..1d88e593e04 100644
--- a/qt/python/mantidqt/plotting/test/test_functions.py
+++ b/qt/python/mantidqt/plotting/test/test_functions.py
@@ -23,6 +23,7 @@ import numpy as np
 # register mantid projection
 import mantid.plots  # noqa
 from mantid.api import AnalysisDataService, WorkspaceFactory
+from mantid.simpleapi import CreateWorkspace
 from mantid.kernel import config
 from mantid.plots import MantidAxes
 from mantid.py3compat import mock
@@ -151,6 +152,11 @@ class FunctionsTest(TestCase):
         pcolormesh_from_names([ws_name])
         self.assertEqual(1, pcolormesh_mock.call_count)
 
+    def test_scale_is_correct_on_pcolourmesh_of_ragged_workspace(self):
+        ws = CreateWorkspace(DataX=[1, 2, 3, 4, 2, 4, 6, 8], DataY=[2] * 8, NSpec=2)
+        fig = pcolormesh_from_names([ws])
+        self.assertEqual((1.8, 2.2), fig.axes[0].images[0].get_clim())
+
     def test_pcolormesh_from_names(self):
         ws_name = 'test_pcolormesh_from_names-1'
         AnalysisDataService.Instance().addOrReplace(ws_name, self._test_ws)
-- 
GitLab