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

Commit919a6cb

Browse files
committed
Add unit test for nonuniform logscale
1 parentc91bf41 commit919a6cb

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.subplots(ncols=3,nrows=1)
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,16)
1419+
ax.set_ylim(1,16)
1420+
ax.set_box_aspect(1)
1421+
ifi==1:
1422+
ax.set_xscale("log",base=2)
1423+
ax.set_yscale("log",base=2)
1424+
ifi==2:
1425+
ax.set_xscale("log",base=4)
1426+
ax.set_yscale("log",base=4)
1427+
ax.add_image(im)
1428+
1429+
14091430
@image_comparison(
14101431
['rgba_antialias.png'],style='mpl20',remove_text=True,
14111432
tol=0ifplatform.machine()=='x86_64'else0.007)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp