@@ -868,8 +868,8 @@ def test_legend_pathcollection_labelcolor_linecolor_iterable():
868
868
# test the labelcolor for labelcolor='linecolor' on PathCollection
869
869
# with iterable colors
870
870
fig , ax = plt .subplots ()
871
- colors = np .random . default_rng (). choice ( ['r' , 'g' , 'b' ], 10 )
872
- ax .scatter (np .arange (10 ), np .arange (10 )* 1 , label = '#1' , c = colors )
871
+ colors = np .array ( ['r' , 'g' , 'b' , 'c' , 'm' ] * 2 )
872
+ ax .scatter (np .arange (10 ), np .arange (10 ), label = '#1' , c = colors )
873
873
874
874
leg = ax .legend (labelcolor = 'linecolor' )
875
875
text , = leg .get_texts ()
@@ -915,8 +915,8 @@ def test_legend_pathcollection_labelcolor_markeredgecolor_iterable():
915
915
# test the labelcolor for labelcolor='markeredgecolor' on PathCollection
916
916
# with iterable colors
917
917
fig , ax = plt .subplots ()
918
- colors = np .random . default_rng (). choice ( ['r' , 'g' , 'b' ], 10 )
919
- ax .scatter (np .arange (10 ), np .arange (10 )* 1 , label = '#1' , edgecolor = colors )
918
+ colors = np .array ( ['r' , 'g' , 'b' , 'c' , 'm' ] * 2 )
919
+ ax .scatter (np .arange (10 ), np .arange (10 ), label = '#1' , edgecolor = colors )
920
920
921
921
leg = ax .legend (labelcolor = 'markeredgecolor' )
922
922
for text , color in zip (leg .get_texts (), ['k' ]):
@@ -970,8 +970,8 @@ def test_legend_pathcollection_labelcolor_markerfacecolor_iterable():
970
970
# test the labelcolor for labelcolor='markerfacecolor' on PathCollection
971
971
# with iterable colors
972
972
fig , ax = plt .subplots ()
973
- colors = np .random . default_rng (). choice ( ['r' , 'g' , 'b' ], 10 )
974
- ax .scatter (np .arange (10 ), np .arange (10 )* 1 , label = '#1' , facecolor = colors )
973
+ colors = np .array ( ['r' , 'g' , 'b' , 'c' , 'm' ] * 2 )
974
+ ax .scatter (np .arange (10 ), np .arange (10 ), label = '#1' , facecolor = colors )
975
975
976
976
leg = ax .legend (labelcolor = 'markerfacecolor' )
977
977
for text , color in zip (leg .get_texts (), ['k' ]):
0 commit comments