@@ -5735,7 +5735,12 @@ def test_text_labelsize():
57355735 ax .tick_params (direction = 'out' )
57365736
57375737
5738- @image_comparison (['pie_default.png' ])
5738+ # Note: The `pie` image tests were affected by Numpy 2.0 changing promotions
5739+ # (NEP 50). While the changes were only marginal, tolerances were introduced.
5740+ # These tolerances could likely go away when numpy 2.0 is the minimum supported
5741+ # numpy and the images are regenerated.
5742+
5743+ @image_comparison (['pie_default.png' ], tol = 0.01 )
57395744def test_pie_default ():
57405745 # The slices will be ordered and plotted counter-clockwise.
57415746 labels = 'Frogs' , 'Hogs' , 'Dogs' , 'Logs'
@@ -5748,7 +5753,7 @@ def test_pie_default():
57485753
57495754
57505755@image_comparison (['pie_linewidth_0' , 'pie_linewidth_0' , 'pie_linewidth_0' ],
5751- extensions = ['png' ], style = 'mpl20' )
5756+ extensions = ['png' ], style = 'mpl20' , tol = 0.01 )
57525757def test_pie_linewidth_0 ():
57535758 # The slices will be ordered and plotted counter-clockwise.
57545759 labels = 'Frogs' , 'Hogs' , 'Dogs' , 'Logs'
@@ -5780,7 +5785,7 @@ def test_pie_linewidth_0():
57805785 plt .axis ('equal' )
57815786
57825787
5783- @image_comparison (['pie_center_radius.png' ], style = 'mpl20' )
5788+ @image_comparison (['pie_center_radius.png' ], style = 'mpl20' , tol = 0.005 )
57845789def test_pie_center_radius ():
57855790 # The slices will be ordered and plotted counter-clockwise.
57865791 labels = 'Frogs' , 'Hogs' , 'Dogs' , 'Logs'
@@ -5800,7 +5805,7 @@ def test_pie_center_radius():
58005805 plt .axis ('equal' )
58015806
58025807
5803- @image_comparison (['pie_linewidth_2.png' ], style = 'mpl20' )
5808+ @image_comparison (['pie_linewidth_2.png' ], style = 'mpl20' , tol = 0.01 )
58045809def test_pie_linewidth_2 ():
58055810 # The slices will be ordered and plotted counter-clockwise.
58065811 labels = 'Frogs' , 'Hogs' , 'Dogs' , 'Logs'
@@ -5815,7 +5820,7 @@ def test_pie_linewidth_2():
58155820 plt .axis ('equal' )
58165821
58175822
5818- @image_comparison (['pie_ccw_true.png' ], style = 'mpl20' )
5823+ @image_comparison (['pie_ccw_true.png' ], style = 'mpl20' , tol = 0.01 )
58195824def test_pie_ccw_true ():
58205825 # The slices will be ordered and plotted counter-clockwise.
58215826 labels = 'Frogs' , 'Hogs' , 'Dogs' , 'Logs'
@@ -5830,7 +5835,7 @@ def test_pie_ccw_true():
58305835 plt .axis ('equal' )
58315836
58325837
5833- @image_comparison (['pie_frame_grid.png' ], style = 'mpl20' )
5838+ @image_comparison (['pie_frame_grid.png' ], style = 'mpl20' , tol = 0.002 )
58345839def test_pie_frame_grid ():
58355840 # The slices will be ordered and plotted counter-clockwise.
58365841 labels = 'Frogs' , 'Hogs' , 'Dogs' , 'Logs'
@@ -5857,7 +5862,7 @@ def test_pie_frame_grid():
58575862 plt .axis ('equal' )
58585863
58595864
5860- @image_comparison (['pie_rotatelabels_true.png' ], style = 'mpl20' )
5865+ @image_comparison (['pie_rotatelabels_true.png' ], style = 'mpl20' , tol = 0.009 )
58615866def test_pie_rotatelabels_true ():
58625867 # The slices will be ordered and plotted counter-clockwise.
58635868 labels = 'Hogwarts' , 'Frogs' , 'Dogs' , 'Logs'
@@ -5872,7 +5877,7 @@ def test_pie_rotatelabels_true():
58725877 plt .axis ('equal' )
58735878
58745879
5875- @image_comparison (['pie_no_label.png' ])
5880+ @image_comparison (['pie_no_label.png' ], tol = 0.01 )
58765881def test_pie_nolabel_but_legend ():
58775882 labels = 'Frogs' , 'Hogs' , 'Dogs' , 'Logs'
58785883 sizes = [15 , 30 , 45 , 10 ]
@@ -5886,7 +5891,7 @@ def test_pie_nolabel_but_legend():
58865891 plt .legend ()
58875892
58885893
5889- @image_comparison (['pie_shadow.png' ], style = 'mpl20' )
5894+ @image_comparison (['pie_shadow.png' ], style = 'mpl20' , tol = 0.002 )
58905895def test_pie_shadow ():
58915896 # Also acts as a test for the shade argument of Shadow
58925897 sizes = [15 , 30 , 45 , 10 ]
0 commit comments