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

Commit64056cf

Browse files
committed
Add test for collections setter and getter
1 parentd71f101 commit64056cf

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎lib/matplotlib/tests/test_collections.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,3 +1336,24 @@ def test_striped_lines(fig_test, fig_ref, gapcolor):
13361336
forx,gcol,lsinzip(x,itertools.cycle(gapcolor),
13371337
itertools.cycle(linestyles)):
13381338
ax_ref.axvline(x,0,1,linestyle=ls,gapcolor=gcol,alpha=0.5)
1339+
1340+
1341+
@check_figures_equal(extensions=['png','pdf','svg','eps'])
1342+
deftest_hatch_linewidth(fig_test,fig_ref):
1343+
ax_test=fig_test.add_subplot()
1344+
ax_ref=fig_ref.add_subplot()
1345+
1346+
lw=2.0
1347+
1348+
ref=mcollections.CircleCollection(sizes=[1,2,3,4,5],hatch='x')
1349+
ref.set_linewidth(2)
1350+
1351+
withmpl.rc_context({'hatch.linewidth':lw}):
1352+
test=mcollections.CircleCollection(sizes=[1,2,3,4,5],hatch='x')
1353+
test.set_linewidth(2)
1354+
1355+
# Add the collection to the axes
1356+
ax_ref.add_collection(ref)
1357+
ax_test.add_collection(test)
1358+
1359+
assert ((test.get_linewidth()==lw)and (ref.get_linewidth()==lw))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp