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

Commit6029e32

Browse files
committed
Updated none patch test
1 parent3bfca5f commit6029e32

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎lib/matplotlib/tests/test_axes.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4673,7 +4673,13 @@ def test_hist_emptydata():
46734673

46744674

46754675
deftest_hist_none_patch():
4676-
plt.hist([1,2],label=["First","Second"])
4676+
# To cover None patches when excess labels are provided
4677+
labels= ["First","Second"]
4678+
patches= [[1,2]]
4679+
fig,ax=plt.subplots()
4680+
ax.hist(patches,label=labels)
4681+
_,lbls=ax.get_legend_handles_labels()
4682+
assert (len(lbls)<len(labels)andlen(patches)<len(labels))
46774683

46784684

46794685
deftest_hist_labels():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp