Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd4710c6

Browse files
committed
added test_loglog in test_datetime.py
1 parent5b5154d commitd4710c6

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
deftest_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('1980-12-01'),np.datetime64('2023-12-06'))
434+
y=10**np.linspace(0,4,len(x))
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)

[8]ページ先頭

©2009-2025 Movatter.jp