@@ -40,7 +40,7 @@ def test_legend_auto1():
4040 x = np .arange (100 )
4141 ax .plot (x , 50 - x , 'o' , label = 'y=1' )
4242 ax .plot (x , x - 50 , 'o' , label = 'y=-1' )
43- ax .legend (loc = 'best' )
43+ ax .legend ()
4444
4545
4646@image_comparison (baseline_images = ['legend_auto2' ], remove_text = True )
@@ -51,7 +51,7 @@ def test_legend_auto2():
5151 x = np .arange (100 )
5252 b1 = ax .bar (x , x , align = 'edge' , color = 'm' )
5353 b2 = ax .bar (x , x [::- 1 ], align = 'edge' , color = 'g' )
54- ax .legend ([b1 [0 ], b2 [0 ]], ['up' , 'down' ], loc = 'best' )
54+ ax .legend ([b1 [0 ], b2 [0 ]], ['up' , 'down' ])
5555
5656
5757@image_comparison (baseline_images = ['legend_auto3' ])
@@ -64,7 +64,7 @@ def test_legend_auto3():
6464 ax .plot (x , y , 'o-' , label = 'line' )
6565 ax .set_xlim (0.0 , 1.0 )
6666 ax .set_ylim (0.0 , 1.0 )
67- ax .legend (loc = 'best' )
67+ ax .legend ()
6868
6969
7070@image_comparison (baseline_images = ['legend_various_labels' ], remove_text = True )
@@ -75,7 +75,7 @@ def test_various_labels():
7575 ax .plot (np .arange (4 ), 'o' , label = 1 )
7676 ax .plot (np .linspace (4 , 4.1 ), 'o' , label = 'Développés' )
7777 ax .plot (np .arange (4 , 1 , - 1 ), 'o' , label = '__nolegend__' )
78- ax .legend (numpoints = 1 , loc = 'best' )
78+ ax .legend (numpoints = 1 )
7979
8080
8181@image_comparison (baseline_images = ['legend_labels_first' ], extensions = ['png' ],
@@ -87,7 +87,7 @@ def test_labels_first():
8787 ax .plot (np .arange (10 ), '-o' , label = 1 )
8888 ax .plot (np .ones (10 )* 5 , ':x' , label = "x" )
8989 ax .plot (np .arange (20 , 10 , - 1 ), 'd' , label = "diamond" )
90- ax .legend (loc = 'best' , markerfirst = False )
90+ ax .legend (markerfirst = False )
9191
9292
9393@image_comparison (baseline_images = ['legend_multiple_keys' ], extensions = ['png' ],
@@ -371,7 +371,7 @@ def test_legend_stackplot():
371371 ax .stackplot (x , y1 , y2 , y3 , labels = ['y1' , 'y2' , 'y3' ])
372372 ax .set_xlim ((0 , 10 ))
373373 ax .set_ylim ((0 , 70 ))
374- ax .legend (loc = 'best' )
374+ ax .legend ()
375375
376376
377377def test_cross_figure_patch_legend ():
@@ -424,7 +424,7 @@ def test_not_covering_scatter():
424424 for n in range (3 ):
425425 plt .scatter ([n ], [n ], color = colors [n ])
426426
427- plt .legend (['foo' , 'foo' , 'foo' ], loc = 'best' )
427+ plt .legend (['foo' , 'foo' , 'foo' ])
428428 plt .gca ().set_xlim (- 0.5 , 2.2 )
429429 plt .gca ().set_ylim (- 0.5 , 2.2 )
430430
@@ -439,7 +439,7 @@ def test_not_covering_scatter_transform():
439439
440440 plt .scatter ([20 ], [10 ], transform = offset + plt .gca ().transData )
441441
442- plt .legend (['foo' , 'bar' ], loc = 'best' )
442+ plt .legend (['foo' , 'bar' ])
443443
444444
445445def test_linecollection_scaled_dashes ():
0 commit comments