@@ -128,8 +128,8 @@ def test_contour_manual_moveto():
128128
129129
130130# TODO: tighten tolerance after baseline image is regenerated for text overhaul
131- @image_comparison (['contour_disconnected_segments' ],
132- remove_text = True , style = 'mpl20' , extensions = [ 'png' ], tol = 0.01 )
131+ @image_comparison (['contour_disconnected_segments.png ' ],
132+ remove_text = True , style = 'mpl20' , tol = 0.01 )
133133def test_contour_label_with_disconnected_segments ():
134134 x , y = np .mgrid [- 1 :1 :21j , - 1 :1 :21j ]
135135 z = 1 / np .sqrt (0.01 + (x + 0.3 ) ** 2 + y ** 2 )
@@ -172,8 +172,7 @@ def test_given_colors_levels_and_extends():
172172 plt .colorbar (c , ax = ax )
173173
174174
175- @image_comparison (['contourf_hatch_colors' ],
176- remove_text = True , style = 'mpl20' , extensions = ['png' ])
175+ @image_comparison (['contourf_hatch_colors.png' ], remove_text = True , style = 'mpl20' )
177176def test_hatch_colors ():
178177 fig , ax = plt .subplots ()
179178 cf = ax .contourf ([[0 , 1 ], [1 , 2 ]], hatches = ['-' , '/' , '\\ ' , '//' ], cmap = 'gray' )
@@ -455,8 +454,7 @@ def test_contour_addlines():
455454 assert_array_almost_equal (cb .ax .get_ylim (), [114.3091 , 9972.30735 ], 3 )
456455
457456
458- @image_comparison (baseline_images = ['contour_uneven' ],
459- extensions = ['png' ], remove_text = True , style = 'mpl20' )
457+ @image_comparison (['contour_uneven.png' ], remove_text = True , style = 'mpl20' )
460458def test_contour_uneven ():
461459 # Remove this line when this test image is regenerated.
462460 plt .rcParams ['pcolormesh.snap' ] = False
@@ -494,8 +492,7 @@ def test_label_nonagg():
494492 plt .clabel (plt .contour ([[1 , 2 ], [3 , 4 ]]))
495493
496494
497- @image_comparison (baseline_images = ['contour_closed_line_loop' ],
498- extensions = ['png' ], remove_text = True )
495+ @image_comparison (['contour_closed_line_loop.png' ], remove_text = True )
499496def test_contour_closed_line_loop ():
500497 # github issue 19568.
501498 z = [[0 , 0 , 0 ], [0 , 2 , 0 ], [0 , 0 , 0 ], [2 , 1 , 2 ]]
@@ -519,8 +516,7 @@ def test_quadcontourset_reuse():
519516 assert qcs3 ._contour_generator == qcs1 ._contour_generator
520517
521518
522- @image_comparison (baseline_images = ['contour_manual' ],
523- extensions = ['png' ], remove_text = True , tol = 0.89 )
519+ @image_comparison (['contour_manual.png' ], remove_text = True , tol = 0.89 )
524520def test_contour_manual ():
525521 # Manually specifying contour lines/polygons to plot.
526522 from matplotlib .contour import ContourSet
@@ -545,8 +541,7 @@ def test_contour_manual():
545541 ContourSet (ax , [2 ], [segs ], [kinds ], colors = 'k' , linewidths = 3 )
546542
547543
548- @image_comparison (baseline_images = ['contour_line_start_on_corner_edge' ],
549- extensions = ['png' ], remove_text = True )
544+ @image_comparison (['contour_line_start_on_corner_edge.png' ], remove_text = True )
550545def test_contour_line_start_on_corner_edge ():
551546 fig , ax = plt .subplots (figsize = (6 , 5 ))
552547
@@ -680,8 +675,7 @@ def test_algorithm_supports_corner_mask(algorithm):
680675 plt .contourf (z , algorithm = algorithm , corner_mask = True )
681676
682677
683- @image_comparison (baseline_images = ['contour_all_algorithms' ],
684- extensions = ['png' ], remove_text = True , tol = 0.06 )
678+ @image_comparison (['contour_all_algorithms.png' ], remove_text = True , tol = 0.06 )
685679def test_all_algorithms ():
686680 algorithms = ['mpl2005' , 'mpl2014' , 'serial' , 'threaded' ]
687681
@@ -858,8 +852,8 @@ def test_allsegs_allkinds():
858852 assert len (result [1 ]) == 4
859853
860854
861- @image_comparison (baseline_images = ['contour_rasterization' ] ,
862- extensions = [ 'pdf' ], style = 'mpl20' , savefig_kwarg = { 'dpi' : 25 } )
855+ @image_comparison (['contour_rasterization.pdf' ], savefig_kwarg = { 'dpi' : 25 } ,
856+ style = 'mpl20' )
863857def test_contourf_rasterize ():
864858 fig , ax = plt .subplots ()
865859 data = [[0 , 1 ], [1 , 0 ]]
@@ -868,7 +862,7 @@ def test_contourf_rasterize():
868862 assert cs ._rasterized
869863
870864
871- @check_figures_equal (extensions = [ "png" ] )
865+ @check_figures_equal ()
872866def test_contour_aliases (fig_test , fig_ref ):
873867 data = np .arange (100 ).reshape ((10 , 10 )) ** 2
874868 fig_test .add_subplot ().contour (data , linestyle = ":" )
0 commit comments