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

Commit3c581ad

Browse files
committed
Add test for NonUniformImage with nonlinear scale
1 parentdaa7b1d commit3c581ad

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

‎lib/matplotlib/tests/test_image.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,27 @@ def test_nonuniform_and_pcolor():
14061406
ax.set(xlim=(0,10))
14071407

14081408

1409+
@image_comparison(["nonuniform_logscale.png"],style="mpl20")
1410+
deftest_nonuniform_logscale():
1411+
axs=plt.figure(figsize=(3,3)).subplots(3)
1412+
1413+
foriinrange(3):
1414+
ax=axs[i]
1415+
im=NonUniformImage(ax)
1416+
im.set_data(np.arange(1,4)**2,np.arange(1,4)**2,
1417+
np.arange(9).reshape((3,3)))
1418+
ax.set_xlim(1,9)
1419+
ax.set_ylim(1,9)
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)
1427+
ax.add_image(im)
1428+
1429+
14091430
@image_comparison(
14101431
['rgba_antialias.png'],style='mpl20',remove_text=True,
14111432
tol=0.007ifplatform.machine()in ('aarch64','ppc64le','s390x')else0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp