diff --git a/qt/python/mantidqt/plotting/test/test_functions.py b/qt/python/mantidqt/plotting/test/test_functions.py index 6dcd7c66a005a2b2c6bb62b31eed3ea5d26e949c..1d88e593e042e8da65c1e8e70974dececc9cba3f 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)