From d4710c6fd9b04ffdd955c19c228182e5b08998dd Mon Sep 17 00:00:00 2001 From: dchen <50563098+dchen2438@users.noreply.github.com> Date: Mon, 4 Dec 2023 03:39:34 +0000 Subject: [PATCH] added test_loglog in test_datetime.py --- lib/matplotlib/tests/test_datetime.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/tests/test_datetime.py b/lib/matplotlib/tests/test_datetime.py index ca8e1cb90732..0f09b57c3725 100644 --- a/lib/matplotlib/tests/test_datetime.py +++ b/lib/matplotlib/tests/test_datetime.py @@ -426,11 +426,15 @@ def test_imshow(self): fig, ax = plt.subplots() ax.imshow(...) - @pytest.mark.xfail(reason="Test for loglog not written yet") @mpl.style.context("default") def test_loglog(self): - fig, ax = plt.subplots() - ax.loglog(...) + mpl.rcParams["date.converter"] = 'concise' + fig, (ax1, ax2, ax3) = plt.subplots(3, 1, layout='constrained') + x = np.arange(np.datetime64('1980-12-01'), np.datetime64('2023-12-06')) + y = 10 ** np.linspace(0, 4, len(x)) + ax1.loglog(x, y) + ax2.loglog(y, x) + ax3.loglog(x, x) @pytest.mark.xfail(reason="Test for matshow not written yet") @mpl.style.context("default")
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: