Skip to content

Commit f5fd5fb

Browse files
committed
added test_loglog in test_datetime.py
1 parent 5b5154d commit f5fd5fb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/matplotlib/tests/test_datetime.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,15 @@ def test_imshow(self):
426426
fig, ax = plt.subplots()
427427
ax.imshow(...)
428428

429-
@pytest.mark.xfail(reason="Test for loglog not written yet")
430429
@mpl.style.context("default")
431430
def test_loglog(self):
432-
fig, ax = plt.subplots()
433-
ax.loglog(...)
431+
mpl.rcParams["date.converter"] = 'concise'
432+
fig, (ax1, ax2, ax3) = plt.subplots(3, 1, layout='constrained')
433+
x = np.arange(np.datetime64('2023-12-01'), np.datetime64('2023-12-06'))
434+
y = 10 ** np.arange(5)
435+
ax1.loglog(x, y)
436+
ax2.loglog(y, x)
437+
ax3.loglog(x, x)
434438

435439
@pytest.mark.xfail(reason="Test for matshow not written yet")
436440
@mpl.style.context("default")

0 commit comments

Comments
 (0)
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