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

Commitec55244

Browse files
committed
Change test for nonlinear NonUniformImage
1 parent855d128 commitec55244

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

‎lib/matplotlib/tests/test_image.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,20 +1408,24 @@ def test_nonuniform_and_pcolor():
14081408

14091409
@image_comparison(["nonuniform_logscale.png"],style="mpl20")
14101410
deftest_nonuniform_logscale():
1411-
fig,axs=plt.subplots(2)
1411+
_,axs=plt.subplots(3)
14121412

1413-
forax,scaleinzip(axs, ["linear","log"]):
1413+
foriinrange(3):
1414+
ax=axs[i]
14141415
im=NonUniformImage(ax)
1415-
im.set_data([1,10], [1,10],np.array([[0,255], [255,0]],dtype=np.uint8))
1416-
1417-
ax.set_xscale(scale)
1418-
ax.set_yscale(scale)
1416+
im.set_data(np.arange(1,4)**2,np.arange(1,4)**2,
1417+
np.arange(9).reshape((3,3)))
14191418
ax.set_xlim(1,10)
14201419
ax.set_ylim(1,10)
1420+
ax.set_axis_off()
1421+
ifi==1:
1422+
ax.set_xscale("log")
1423+
ax.set_yscale("log")
1424+
ifi==2:
1425+
ax.set_xscale("log",base=2)
1426+
ax.set_yscale("log",base=3)
14211427
ax.add_image(im)
14221428

1423-
ax.add_image(im)
1424-
14251429

14261430
@image_comparison(
14271431
['rgba_antialias.png'],style='mpl20',remove_text=True,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp