File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -691,25 +691,19 @@ def test_legend_pathcollection_labelcolor_linecolor_iterable():
691691 ax .scatter (np .arange (10 ), np .arange (10 )* 1 , label = '#1' , c = colors )
692692
693693 leg = ax .legend (labelcolor = 'linecolor' )
694- for text , color in zip ( leg .get_texts (), [ 'k' ]):
695- assert mpl .colors .same_color (text . get_color (), color )
694+ text , = leg .get_texts ()
695+ assert mpl .colors .same_color (text , 'black' )
696696
697697
698698def test_legend_pathcollection_labelcolor_linecolor_cmap ():
699699 # test the labelcolor for labelcolor='linecolor' on PathCollection
700700 # with a colormap
701701 fig , ax = plt .subplots ()
702- ax .scatter (
703- np .arange (10 ),
704- np .arange (10 ),
705- label = '#1' ,
706- c = np .arange (10 ),
707- cmap = "Reds"
708- )
702+ ax .scatter (np .arange (10 ), np .arange (10 ), c = np .arange (10 ), label = '#1' )
709703
710704 leg = ax .legend (labelcolor = 'linecolor' )
711- for text , color in zip ( leg .get_texts (), [ 'k' ]):
712- assert mpl .colors .same_color (text . get_color (), color )
705+ text , = leg .get_texts ()
706+ assert mpl .colors .same_color (text , 'black' )
713707
714708
715709def test_legend_labelcolor_markeredgecolor ():
You can’t perform that action at this time.
0 commit comments