@@ -868,8 +868,8 @@ def test_legend_pathcollection_labelcolor_linecolor_iterable():
868868 # test the labelcolor for labelcolor='linecolor' on PathCollection
869869 # with iterable colors
870870 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 )
873873
874874 leg = ax .legend (labelcolor = 'linecolor' )
875875 text , = leg .get_texts ()
@@ -915,8 +915,8 @@ def test_legend_pathcollection_labelcolor_markeredgecolor_iterable():
915915 # test the labelcolor for labelcolor='markeredgecolor' on PathCollection
916916 # with iterable colors
917917 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 )
920920
921921 leg = ax .legend (labelcolor = 'markeredgecolor' )
922922 for text , color in zip (leg .get_texts (), ['k' ]):
@@ -970,8 +970,8 @@ def test_legend_pathcollection_labelcolor_markerfacecolor_iterable():
970970 # test the labelcolor for labelcolor='markerfacecolor' on PathCollection
971971 # with iterable colors
972972 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 )
975975
976976 leg = ax .legend (labelcolor = 'markerfacecolor' )
977977 for text , color in zip (leg .get_texts (), ['k' ]):
0 commit comments