@@ -231,7 +231,7 @@ def test_antialiasing():
231231# TODO: tighten tolerance after baseline image is regenerated for text overhaul
232232@image_comparison (['text_contains.png' ], style = 'mpl20' , tol = 0.05 )
233233def test_contains ():
234- fig = plt .figure ()
234+ fig = plt .figure (figsize = ( 8 , 6 ) )
235235 ax = plt .axes ()
236236
237237 mevent = MouseEvent ('button_press_event' , fig .canvas , 0.5 , 0.5 , 1 , None )
@@ -505,26 +505,26 @@ def test_annotation_negative_fig_coords():
505505 fig , ax = plt .subplots ()
506506
507507 ax .annotate ('+ pts' ,
508- xytext = [10 , 120 ], textcoords = 'figure points' ,
509- xy = [10 , 120 ], xycoords = 'figure points' , fontsize = 32 )
508+ xytext = [10 , 250 ], textcoords = 'figure points' ,
509+ xy = [10 , 250 ], xycoords = 'figure points' , fontsize = 32 )
510510 ax .annotate ('- pts' ,
511- xytext = [- 10 , 180 ], textcoords = 'figure points' ,
512- xy = [- 10 , 180 ], xycoords = 'figure points' , fontsize = 32 ,
511+ xytext = [- 10 , 310 ], textcoords = 'figure points' ,
512+ xy = [- 10 , 310 ], xycoords = 'figure points' , fontsize = 32 ,
513513 va = 'top' )
514514 ax .annotate ('+ frac' ,
515- xytext = [0.05 , 0.55 ], textcoords = 'figure fraction' ,
516- xy = [0.05 , 0.55 ], xycoords = 'figure fraction' , fontsize = 32 )
515+ xytext = [0.05 , 0.5 ], textcoords = 'figure fraction' ,
516+ xy = [0.05 , 0.5 ], xycoords = 'figure fraction' , fontsize = 32 )
517517 ax .annotate ('- frac' ,
518- xytext = [- 0.05 , 0.5 ], textcoords = 'figure fraction' ,
519- xy = [- 0.05 , 0.5 ], xycoords = 'figure fraction' , fontsize = 32 ,
518+ xytext = [- 0.05 , 0.45 ], textcoords = 'figure fraction' ,
519+ xy = [- 0.05 , 0.45 ], xycoords = 'figure fraction' , fontsize = 32 ,
520520 va = 'top' )
521521
522522 ax .annotate ('+ pixels' ,
523523 xytext = [50 , 50 ], textcoords = 'figure pixels' ,
524524 xy = [50 , 50 ], xycoords = 'figure pixels' , fontsize = 32 )
525525 ax .annotate ('- pixels' ,
526- xytext = [- 50 , 100 ], textcoords = 'figure pixels' ,
527- xy = [- 50 , 100 ], xycoords = 'figure pixels' , fontsize = 32 ,
526+ xytext = [- 50 , 150 ], textcoords = 'figure pixels' ,
527+ xy = [- 50 , 150 ], xycoords = 'figure pixels' , fontsize = 32 ,
528528 va = 'top' )
529529
530530
@@ -1144,7 +1144,7 @@ def test_empty_annotation_get_window_extent():
11441144# TODO: tighten tolerance after baseline image is regenerated for text overhaul
11451145@image_comparison (['basictext_wrap.png' ], style = 'mpl20' , tol = 0.3 )
11461146def test_basic_wrap ():
1147- fig = plt .figure ()
1147+ fig = plt .figure (figsize = ( 8 , 6 ) )
11481148 plt .axis ([0 , 10 , 0 , 10 ])
11491149 t = "This is a really long string that I'd rather have wrapped so that" \
11501150 " it doesn't go outside of the figure, but if it's long enough it" \
@@ -1161,7 +1161,7 @@ def test_basic_wrap():
11611161# TODO: tighten tolerance after baseline image is regenerated for text overhaul
11621162@image_comparison (['fonttext_wrap.png' ], style = 'mpl20' , tol = 0.3 )
11631163def test_font_wrap ():
1164- fig = plt .figure ()
1164+ fig = plt .figure (figsize = ( 8 , 6 ) )
11651165 plt .axis ([0 , 10 , 0 , 10 ])
11661166 t = "This is a really long string that I'd rather have wrapped so that" \
11671167 " it doesn't go outside of the figure, but if it's long enough it" \
0 commit comments