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

Commita2a2809

Browse files
Added smoke test for Axes.matshow to test_datetime.py (#27474)
1 parent8fa89d6 commita2a2809

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎lib/matplotlib/tests/test_datetime.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,16 @@ def test_loglog(self):
542542
fig,ax=plt.subplots()
543543
ax.loglog(...)
544544

545-
@pytest.mark.xfail(reason="Test for matshow not written yet")
546545
@mpl.style.context("default")
547546
deftest_matshow(self):
547+
a=np.diag(range(5))
548+
dt_start=datetime.datetime(1980,4,15)
549+
dt_end=datetime.datetime(2020,11,11)
550+
extent= (dt_start,dt_end,dt_start,dt_end)
548551
fig,ax=plt.subplots()
549-
ax.matshow(...)
552+
ax.matshow(a,extent=extent)
553+
forlabelinax.get_xticklabels():
554+
label.set_rotation(90)
550555

551556
@pytest.mark.xfail(reason="Test for pcolor not written yet")
552557
@mpl.style.context("default")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp