@@ -237,7 +237,8 @@ def test_matshow(fig_test, fig_ref):
237
237
'formatter_ticker_003' ,
238
238
'formatter_ticker_004' ,
239
239
'formatter_ticker_005' ,
240
- ])
240
+ ],
241
+ tol = 0.022 if platform .machine () == 'arm64' else 0 )
241
242
def test_formatter_ticker ():
242
243
import matplotlib .testing .jpl_units as units
243
244
units .register ()
@@ -437,7 +438,8 @@ def test_twin_logscale(fig_test, fig_ref, twin):
437
438
remove_ticks_and_titles (fig_ref )
438
439
439
440
440
- @image_comparison (['twin_autoscale.png' ])
441
+ @image_comparison (['twin_autoscale.png' ],
442
+ tol = 0.009 if platform .machine () == 'arm64' else 0 )
441
443
def test_twinx_axis_scales ():
442
444
x = np .array ([0 , 0.5 , 1 ])
443
445
y = 0.5 * x
@@ -1232,7 +1234,8 @@ def test_fill_betweenx_input(y, x1, x2):
1232
1234
ax .fill_betweenx (y , x1 , x2 )
1233
1235
1234
1236
1235
- @image_comparison (['fill_between_interpolate' ], remove_text = True )
1237
+ @image_comparison (['fill_between_interpolate' ], remove_text = True ,
1238
+ tol = 0.012 if platform .machine () == 'arm64' else 0 )
1236
1239
def test_fill_between_interpolate ():
1237
1240
x = np .arange (0.0 , 2 , 0.02 )
1238
1241
y1 = np .sin (2 * np .pi * x )
@@ -1623,7 +1626,7 @@ def test_pcolorauto(fig_test, fig_ref, snap):
1623
1626
ax .pcolormesh (x2 , y2 , Z , snap = snap )
1624
1627
1625
1628
1626
- @image_comparison (['canonical' ])
1629
+ @image_comparison (['canonical' ], tol = 0.02 if platform . machine () == 'arm64' else 0 )
1627
1630
def test_canonical ():
1628
1631
fig , ax = plt .subplots ()
1629
1632
ax .plot ([1 , 2 , 3 ])
@@ -3065,7 +3068,8 @@ def test_log_scales_invalid():
3065
3068
ax .set_ylim (- 1 , 10 )
3066
3069
3067
3070
3068
- @image_comparison (['stackplot_test_image' , 'stackplot_test_image' ])
3071
+ @image_comparison (['stackplot_test_image' , 'stackplot_test_image' ],
3072
+ tol = 0.031 if platform .machine () == 'arm64' else 0 )
3069
3073
def test_stackplot ():
3070
3074
fig = plt .figure ()
3071
3075
x = np .linspace (0 , 10 , 10 )
@@ -4873,7 +4877,8 @@ def test_marker_styles():
4873
4877
marker = marker , markersize = 10 + y / 5 , label = marker )
4874
4878
4875
4879
4876
- @image_comparison (['rc_markerfill.png' ])
4880
+ @image_comparison (['rc_markerfill.png' ],
4881
+ tol = 0.037 if platform .machine () == 'arm64' else 0 )
4877
4882
def test_markers_fillstyle_rcparams ():
4878
4883
fig , ax = plt .subplots ()
4879
4884
x = np .arange (7 )
@@ -4896,7 +4901,7 @@ def test_vertex_markers():
4896
4901
4897
4902
4898
4903
@image_comparison (['vline_hline_zorder' , 'errorbar_zorder' ],
4899
- tol = 0 if platform .machine () == 'x86_64' else 0.02 )
4904
+ tol = 0 if platform .machine () == 'x86_64' else 0.026 )
4900
4905
def test_eb_line_zorder ():
4901
4906
x = list (range (10 ))
4902
4907
@@ -5455,7 +5460,8 @@ def test_twin_remove(fig_test, fig_ref):
5455
5460
ax_ref .yaxis .tick_left ()
5456
5461
5457
5462
5458
- @image_comparison (['twin_spines.png' ], remove_text = True )
5463
+ @image_comparison (['twin_spines.png' ], remove_text = True ,
5464
+ tol = 0.022 if platform .machine () == 'arm64' else 0 )
5459
5465
def test_twin_spines ():
5460
5466
5461
5467
def make_patch_spines_invisible (ax ):
@@ -5822,7 +5828,7 @@ def test_pie_linewidth_0():
5822
5828
plt .axis ('equal' )
5823
5829
5824
5830
5825
- @image_comparison (['pie_center_radius.png' ], style = 'mpl20' , tol = 0.005 )
5831
+ @image_comparison (['pie_center_radius.png' ], style = 'mpl20' , tol = 0.007 )
5826
5832
def test_pie_center_radius ():
5827
5833
# The slices will be ordered and plotted counter-clockwise.
5828
5834
labels = 'Frogs' , 'Hogs' , 'Dogs' , 'Logs'
@@ -6008,7 +6014,8 @@ def test_pie_hatch_multi(fig_test, fig_ref):
6008
6014
[w .set_hatch (hp ) for w , hp in zip (wedges , hatch )]
6009
6015
6010
6016
6011
- @image_comparison (['set_get_ticklabels.png' ])
6017
+ @image_comparison (['set_get_ticklabels.png' ],
6018
+ tol = 0.025 if platform .machine () == 'arm64' else 0 )
6012
6019
def test_set_get_ticklabels ():
6013
6020
# test issue 2246
6014
6021
fig , ax = plt .subplots (2 )
@@ -6572,7 +6579,8 @@ def test_loglog():
6572
6579
ax .tick_params (length = 15 , width = 2 , which = 'minor' )
6573
6580
6574
6581
6575
- @image_comparison (["test_loglog_nonpos.png" ], remove_text = True , style = 'mpl20' )
6582
+ @image_comparison (["test_loglog_nonpos.png" ], remove_text = True , style = 'mpl20' ,
6583
+ tol = 0.029 if platform .machine () == 'arm64' else 0 )
6576
6584
def test_loglog_nonpos ():
6577
6585
fig , axs = plt .subplots (3 , 3 )
6578
6586
x = np .arange (1 , 11 )
@@ -7498,8 +7506,8 @@ def test_scatter_empty_data():
7498
7506
plt .scatter ([], [], s = [], c = [])
7499
7507
7500
7508
7501
- @image_comparison (['annotate_across_transforms.png' ],
7502
- style = 'mpl20' , remove_text = True )
7509
+ @image_comparison (['annotate_across_transforms.png' ], style = 'mpl20' , remove_text = True ,
7510
+ tol = 0.025 if platform . machine () == 'arm64' else 0 )
7503
7511
def test_annotate_across_transforms ():
7504
7512
x = np .linspace (0 , 10 , 200 )
7505
7513
y = np .exp (- x ) * np .sin (x )
@@ -7529,7 +7537,8 @@ def inverted(self):
7529
7537
return _Translation (- self .dx )
7530
7538
7531
7539
7532
- @image_comparison (['secondary_xy.png' ], style = 'mpl20' )
7540
+ @image_comparison (['secondary_xy.png' ], style = 'mpl20' ,
7541
+ tol = 0.027 if platform .machine () == 'arm64' else 0 )
7533
7542
def test_secondary_xy ():
7534
7543
fig , axs = plt .subplots (1 , 2 , figsize = (10 , 5 ), constrained_layout = True )
7535
7544
@@ -8785,7 +8794,8 @@ def test_zorder_and_explicit_rasterization():
8785
8794
fig .savefig (b , format = 'pdf' )
8786
8795
8787
8796
8788
- @image_comparison (["preset_clip_paths.png" ], remove_text = True , style = "mpl20" )
8797
+ @image_comparison (["preset_clip_paths.png" ], remove_text = True , style = "mpl20" ,
8798
+ tol = 0.027 if platform .machine () == "arm64" else 0 )
8789
8799
def test_preset_clip_paths ():
8790
8800
fig , ax = plt .subplots ()
8791
8801
0 commit comments