From 52d7ef29479fd9dae7a388968b69ab032edf74fc Mon Sep 17 00:00:00 2001 From: ConstableCatnip <38230539+ConstableCatnip@users.noreply.github.com> Date: Fri, 8 Dec 2023 19:15:48 +0000 Subject: [PATCH 1/2] Added smoke test for Axes.matshow to test_datetime.py --- lib/matplotlib/tests/test_datetime.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/tests/test_datetime.py b/lib/matplotlib/tests/test_datetime.py index 529244c9656b..b345cafed97b 100644 --- a/lib/matplotlib/tests/test_datetime.py +++ b/lib/matplotlib/tests/test_datetime.py @@ -542,11 +542,16 @@ def test_loglog(self): fig, ax = plt.subplots() ax.loglog(...) - @pytest.mark.xfail(reason="Test for matshow not written yet") @mpl.style.context("default") def test_matshow(self): + a = np.diag(range(5)) + dt_start = datetime.datetime(1980, 4, 15) + dt_end = datetime.datetime(2020, 11, 11) + extent = (dt_start, dt_end, dt_start, dt_end) fig, ax = plt.subplots() - ax.matshow(...) + ax.matshow(a, extent=extent) + for label in ax.get_xticklabels(): + label.set_rotation(90) @pytest.mark.xfail(reason="Test for pcolor not written yet") @mpl.style.context("default") From 622f5ff55196c223b2c9d0192563799c09b8cbcc Mon Sep 17 00:00:00 2001 From: ConstableCatnip <38230539+ConstableCatnip@users.noreply.github.com> Date: Fri, 8 Dec 2023 19:36:17 +0000 Subject: [PATCH 2/2] proper indentation --- lib/matplotlib/tests/test_datetime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_datetime.py b/lib/matplotlib/tests/test_datetime.py index b345cafed97b..3c8cc8b5b8bb 100644 --- a/lib/matplotlib/tests/test_datetime.py +++ b/lib/matplotlib/tests/test_datetime.py @@ -551,7 +551,7 @@ def test_matshow(self): fig, ax = plt.subplots() ax.matshow(a, extent=extent) for label in ax.get_xticklabels(): - label.set_rotation(90) + label.set_rotation(90) @pytest.mark.xfail(reason="Test for pcolor not written yet") @mpl.style.context("default") pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy