From 5497aa79bf01a9409a7d3264cc22a6239b3164e9 Mon Sep 17 00:00:00 2001 From: "ukmo-chris.bunney" Date: Wed, 9 Oct 2024 13:22:43 +0100 Subject: [PATCH] Added new test case for pcolormesh, pcolor and contourf --- lib/iris/tests/results/imagerepo.json | 3 +++ lib/iris/tests/test_quickplot.py | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/iris/tests/results/imagerepo.json b/lib/iris/tests/results/imagerepo.json index 69beacb848..66baacade0 100644 --- a/lib/iris/tests/results/imagerepo.json +++ b/lib/iris/tests/results/imagerepo.json @@ -212,10 +212,13 @@ "iris.tests.test_quickplot.TestLabels.test_contourf.1": "bf802f85c17fc17fc07eb42ac17f3f929130c06e3f80c07f7aa02e85c07f3e81", "iris.tests.test_quickplot.TestLabels.test_contourf.2": "be816a95907ae508c17e955ac07f3fa0945bc07f3f80c07f3aa36f01c0ff3f80", "iris.tests.test_quickplot.TestLabels.test_contourf_nameless.0": "be816af5907ee508c17e955ac03f3f809419c07f3f80c07f3a8b6f81c0ff3f80", + "iris.tests.test_quickplot.TestLabels.test_contourf_no_colorbar.0": "bf80c391c17fe07ec07e1d1a917e3f42917879224834487c6e24ca3e2f87c2ff", "iris.tests.test_quickplot.TestLabels.test_map.0": "e85a634c86a597a793c9349b94b79969c396c95bcce69a64d938c9b039a58ca6", "iris.tests.test_quickplot.TestLabels.test_map.1": "e85a636c86a597a793c9349b94b69969c396c95bcce69a64d938c9b039a58ca6", "iris.tests.test_quickplot.TestLabels.test_pcolor.0": "eea16affc05ab500956e974ac53f3d80925ac03f2f81c07e3fa12da1c2fe3f80", + "iris.tests.test_quickplot.TestLabels.test_pcolor_no_colorbar.0": "eea1c2dac51ab54a905e2d20905a6da5d05e6da19d60dade6da1dade6da1d2d8", "iris.tests.test_quickplot.TestLabels.test_pcolormesh.0": "eea16affc05ab500956e974ac53f3d80925ac03f2f81c07e3fa12da1c2fe3f80", + "iris.tests.test_quickplot.TestLabels.test_pcolormesh_no_colorbar.0": "eea1c2dac51ab54a905e2d20905a6da1d05e6da19d60dade6da1dade6da1d2dc", "iris.tests.test_quickplot.TestLabels.test_pcolormesh_str_symbol.0": "eea16affc05ab500956e974ac53f3d80925ac03f3f80c07e3fa12d21c2ff3f80", "iris.tests.test_quickplot.TestPlotHist.test_horizontal.0": "b59cc3dadb433c24c4f166039438793591a7dbdcbcdc9ccc68c697a91b139131", "iris.tests.test_quickplot.TestPlotHist.test_vertical.0": "bf80c7c6c07d7959647e343a33364b699589c6c64ec0312b9e227ad681ffcc68", diff --git a/lib/iris/tests/test_quickplot.py b/lib/iris/tests/test_quickplot.py index fdd534a2c5..d12c4a0592 100644 --- a/lib/iris/tests/test_quickplot.py +++ b/lib/iris/tests/test_quickplot.py @@ -174,10 +174,19 @@ def test_contourf_nameless(self): qplt.contourf(cube, coords=["grid_longitude", "model_level_number"]) self.check_graphic() + def test_contourf_no_colorbar(self): + qplt.contourf(self._small(), colorbar=False, + coords=["model_level_number", "grid_longitude"]) + self.check_graphic() + def test_pcolor(self): qplt.pcolor(self._small()) self.check_graphic() + def test_pcolor_no_colorbar(self): + qplt.pcolor(self._small(), colorbar=False) + self.check_graphic() + def test_pcolormesh(self): qplt.pcolormesh(self._small()) @@ -193,6 +202,10 @@ def test_pcolormesh_str_symbol(self): self.check_graphic() + def test_pcolormesh_no_colorbar(self): + qplt.pcolormesh(self._small(), colorbar=False) + self.check_graphic() + def test_map(self): cube = self._slice(["grid_latitude", "grid_longitude"]) qplt.contour(cube)