Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a94dc42

Browse files
committed
Correct get_text() call to get_color()
1 parent 3a53ebf commit a94dc42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/tests/test_legend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ def test_legend_pathcollection_labelcolor_linecolor_iterable():
692692

693693
leg = ax.legend(labelcolor='linecolor')
694694
text, = leg.get_texts()
695-
assert mpl.colors.same_color(text.get_text(), 'black')
695+
assert mpl.colors.same_color(text.get_color(), 'black')
696696

697697

698698
def test_legend_pathcollection_labelcolor_linecolor_cmap():
@@ -703,7 +703,7 @@ def test_legend_pathcollection_labelcolor_linecolor_cmap():
703703

704704
leg = ax.legend(labelcolor='linecolor')
705705
text, = leg.get_texts()
706-
assert mpl.colors.same_color(text.get_text(), 'black')
706+
assert mpl.colors.same_color(text.get_color(), 'black')
707707

708708

709709
def test_legend_labelcolor_markeredgecolor():

0 commit comments

Comments
 (0)