b0c798d
From d9fada8cc0ef89142222f4c163ec9dd155662cb6 Mon Sep 17 00:00:00 2001
3f6380d
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1584487
Date: Sat, 31 Mar 2018 00:15:14 -0400
9046bbb
Subject: [PATCH 4/4] Increase some tolerances for 32-bit systems.
3f6380d
3f6380d
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
3f6380d
---
69d38c5
 lib/matplotlib/testing/decorators.py          |  2 +-
69d38c5
 lib/matplotlib/tests/test_artist.py           |  3 +-
c385e2c
 lib/matplotlib/tests/test_axes.py             | 49 ++++++++++---------
69d38c5
 lib/matplotlib/tests/test_collections.py      |  2 +-
69d38c5
 lib/matplotlib/tests/test_colorbar.py         | 11 +++--
69d38c5
 .../tests/test_constrainedlayout.py           |  2 +-
c385e2c
 lib/matplotlib/tests/test_contour.py          |  8 +--
c385e2c
 lib/matplotlib/tests/test_cycles.py           |  3 --
c385e2c
 lib/matplotlib/tests/test_figure.py           |  3 +-
69d38c5
 lib/matplotlib/tests/test_image.py            |  2 +-
c385e2c
 lib/matplotlib/tests/test_legend.py           |  5 +-
69d38c5
 lib/matplotlib/tests/test_mathtext.py         |  4 +-
69d38c5
 lib/matplotlib/tests/test_patches.py          |  3 +-
69d38c5
 lib/matplotlib/tests/test_patheffects.py      |  2 +-
69d38c5
 lib/matplotlib/tests/test_pickle.py           |  2 +-
69d38c5
 lib/matplotlib/tests/test_quiver.py           |  2 +-
1dcb7af
 lib/matplotlib/tests/test_streamplot.py       |  2 +-
69d38c5
 lib/matplotlib/tests/test_transforms.py       |  2 +-
c385e2c
 lib/matplotlib/tests/test_units.py            |  1 -
69d38c5
 .../tests/test_axisartist_floating_axes.py    |  4 +-
69d38c5
 ...test_axisartist_grid_helper_curvelinear.py |  6 +--
69d38c5
 lib/mpl_toolkits/tests/test_mplot3d.py        |  4 +-
c385e2c
 22 files changed, 59 insertions(+), 63 deletions(-)
3f6380d
1584487
diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py
9046bbb
index 04d5bcda8..70de0263b 100644
1584487
--- a/lib/matplotlib/testing/decorators.py
1584487
+++ b/lib/matplotlib/testing/decorators.py
9046bbb
@@ -341,7 +341,7 @@ def _pytest_image_comparison(baseline_images, extensions, tol,
1584487
     return decorator
1584487
 
1584487
 
1584487
-def image_comparison(baseline_images, extensions=None, tol=0,
1584487
+def image_comparison(baseline_images, extensions=None, tol=0.1,
1584487
                      freetype_version=None, remove_text=False,
1584487
                      savefig_kwarg=None,
1584487
                      # Default of mpl_test_settings fixture and cleanup too.
3f6380d
diff --git a/lib/matplotlib/tests/test_artist.py b/lib/matplotlib/tests/test_artist.py
9046bbb
index 9bf15d0b9..5339dd2eb 100644
3f6380d
--- a/lib/matplotlib/tests/test_artist.py
3f6380d
+++ b/lib/matplotlib/tests/test_artist.py
1dcb7af
@@ -94,7 +94,8 @@ def test_collection_transform_of_none():
3f6380d
     assert isinstance(c._transOffset, mtransforms.IdentityTransform)
3f6380d
 
3f6380d
 
3f6380d
-@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True)
3f6380d
+@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True,
3f6380d
+                  tol=0.28)
3f6380d
 def test_clipping():
3f6380d
     exterior = mpath.Path.unit_rectangle().deepcopy()
3f6380d
     exterior.vertices *= 4
3f6380d
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
b0c798d
index 84a1956ee..50eb0e6a4 100644
3f6380d
--- a/lib/matplotlib/tests/test_axes.py
3f6380d
+++ b/lib/matplotlib/tests/test_axes.py
9046bbb
@@ -562,7 +562,7 @@ def test_single_point():
3f6380d
 
3f6380d
 
1dcb7af
 @image_comparison(baseline_images=['single_date'], extensions=['png'],
1dcb7af
-        style='mpl20')
1dcb7af
+        style='mpl20', tol=1.97)
3f6380d
 def test_single_date():
3f6380d
     time1 = [721964.0]
3f6380d
     data1 = [-65.54]
9046bbb
@@ -1079,7 +1079,7 @@ def test_fill_between_interpolate():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['fill_between_interpolate_decreasing'],
3f6380d
-                  style='mpl20', remove_text=True)
3f6380d
+                  style='mpl20', remove_text=True, tol=0.78)
3f6380d
 def test_fill_between_interpolate_decreasing():
3f6380d
     p = np.array([724.3, 700, 655])
3f6380d
     t = np.array([9.4, 7, 2.2])
9046bbb
@@ -1164,7 +1164,8 @@ def test_pcolormesh():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['pcolormesh_datetime_axis'],
1dcb7af
-                  extensions=['png'], remove_text=False, style='mpl20')
1dcb7af
+                  extensions=['png'], remove_text=False, style='mpl20',
1dcb7af
+                  tol=0.19)
3f6380d
 def test_pcolormesh_datetime_axis():
3f6380d
     fig = plt.figure()
3f6380d
     fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)
9046bbb
@@ -1190,7 +1191,8 @@ def test_pcolormesh_datetime_axis():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['pcolor_datetime_axis'],
1dcb7af
-                  extensions=['png'], remove_text=False, style='mpl20')
1dcb7af
+                  extensions=['png'], remove_text=False, style='mpl20',
1dcb7af
+                  tol=0.19)
3f6380d
 def test_pcolor_datetime_axis():
3f6380d
     fig = plt.figure()
3f6380d
     fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)
9046bbb
@@ -1247,7 +1249,7 @@ def test_canonical():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['arc_angles'], remove_text=True,
3f6380d
-                  style='default', extensions=['png'])
3f6380d
+                  style='default', extensions=['png'], tol=0.17)
3f6380d
 def test_arc_angles():
3f6380d
     from matplotlib import patches
3f6380d
     # Ellipse parameters
b0c798d
@@ -2644,7 +2646,7 @@ def test_boxplot_mod_artist_after_plotting():
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_vert_baseline',
3f6380d
                                    'violinplot_vert_baseline'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.24)
3f6380d
 def test_vert_violinplot_baseline():
3f6380d
     # First 9 digits of frac(sqrt(2))
3f6380d
     np.random.seed(414213562)
b0c798d
@@ -2662,7 +2664,7 @@ def test_vert_violinplot_baseline():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_vert_showmeans'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.23)
3f6380d
 def test_vert_violinplot_showmeans():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(3))
b0c798d
@@ -2673,7 +2675,7 @@ def test_vert_violinplot_showmeans():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_vert_showextrema'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.23)
3f6380d
 def test_vert_violinplot_showextrema():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(5))
b0c798d
@@ -2684,7 +2686,7 @@ def test_vert_violinplot_showextrema():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_vert_showmedians'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.23)
3f6380d
 def test_vert_violinplot_showmedians():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(7))
b0c798d
@@ -2695,7 +2697,7 @@ def test_vert_violinplot_showmedians():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_vert_showall'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.2)
3f6380d
 def test_vert_violinplot_showall():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(11))
b0c798d
@@ -2706,7 +2708,7 @@ def test_vert_violinplot_showall():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_vert_custompoints_10'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.22)
3f6380d
 def test_vert_violinplot_custompoints_10():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(13))
b0c798d
@@ -2717,7 +2719,7 @@ def test_vert_violinplot_custompoints_10():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_vert_custompoints_200'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.22)
3f6380d
 def test_vert_violinplot_custompoints_200():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(17))
b0c798d
@@ -2728,7 +2730,7 @@ def test_vert_violinplot_custompoints_200():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_horiz_baseline'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.2)
3f6380d
 def test_horiz_violinplot_baseline():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(19))
b0c798d
@@ -2739,7 +2741,7 @@ def test_horiz_violinplot_baseline():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_horiz_showmedians'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.23)
3f6380d
 def test_horiz_violinplot_showmedians():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(23))
b0c798d
@@ -2750,7 +2752,7 @@ def test_horiz_violinplot_showmedians():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_horiz_showmeans'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.25)
3f6380d
 def test_horiz_violinplot_showmeans():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(29))
b0c798d
@@ -2761,7 +2763,7 @@ def test_horiz_violinplot_showmeans():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_horiz_showextrema'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.2)
3f6380d
 def test_horiz_violinplot_showextrema():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(31))
b0c798d
@@ -2772,7 +2774,7 @@ def test_horiz_violinplot_showextrema():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_horiz_showall'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.19)
3f6380d
 def test_horiz_violinplot_showall():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(37))
b0c798d
@@ -2783,7 +2785,7 @@ def test_horiz_violinplot_showall():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_horiz_custompoints_10'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.22)
3f6380d
 def test_horiz_violinplot_custompoints_10():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(41))
b0c798d
@@ -2794,7 +2796,7 @@ def test_horiz_violinplot_custompoints_10():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['violinplot_horiz_custompoints_200'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.22)
3f6380d
 def test_horiz_violinplot_custompoints_200():
3f6380d
     ax = plt.axes()
3f6380d
     # First 9 digits of frac(sqrt(43))
b0c798d
@@ -3518,8 +3520,7 @@ def test_vertex_markers():
c385e2c
 
c385e2c
 
c385e2c
 @image_comparison(baseline_images=['vline_hline_zorder',
c385e2c
-                                   'errorbar_zorder'],
c385e2c
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
c385e2c
+                                   'errorbar_zorder'])
c385e2c
 def test_eb_line_zorder():
c385e2c
     x = list(range(10))
c385e2c
 
b0c798d
@@ -4199,7 +4200,7 @@ def test_psd_noise():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['csd_freqs'], remove_text=True,
a6c4a06
-                  extensions=['png'], tol=0.002)
3f6380d
+                  extensions=['png'], tol=0.21)
3f6380d
 def test_csd_freqs():
3f6380d
     '''test axes.csd with sinusoidal stimuli'''
3f6380d
     n = 10000
b0c798d
@@ -5117,7 +5118,7 @@ def test_rc_spines():
1584487
 
1584487
 
1584487
 @image_comparison(baseline_images=['rc_grid'], extensions=['png'],
1584487
-                  savefig_kwarg={'dpi': 40})
1584487
+                  savefig_kwarg={'dpi': 40}, tol=0.2)
1584487
 def test_rc_grid():
1584487
     fig = plt.figure()
1584487
     rc_dict0 = {
b0c798d
@@ -5679,7 +5680,7 @@ def test_date_timezone_y():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['date_timezone_x_and_y'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=3.05)
3f6380d
 def test_date_timezone_x_and_y():
3f6380d
     # Tests issue 5575
1dcb7af
     UTC = datetime.timezone.utc
3f6380d
diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py
1f37c6a
index 773093100..37356d5e0 100644
3f6380d
--- a/lib/matplotlib/tests/test_collections.py
3f6380d
+++ b/lib/matplotlib/tests/test_collections.py
1dcb7af
@@ -466,7 +466,7 @@ def test_EllipseCollection():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['polycollection_close'],
3f6380d
-                  extensions=['png'], remove_text=True)
3f6380d
+                  extensions=['png'], remove_text=True, tol=0.45)
3f6380d
 def test_polycollection_close():
3f6380d
     from mpl_toolkits.mplot3d import Axes3D
3f6380d
 
3f6380d
diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py
9046bbb
index c65ad02c3..79deb249c 100644
3f6380d
--- a/lib/matplotlib/tests/test_colorbar.py
3f6380d
+++ b/lib/matplotlib/tests/test_colorbar.py
9046bbb
@@ -97,7 +97,7 @@ def _colorbar_extension_length(spacing):
3f6380d
 @image_comparison(
3f6380d
         baseline_images=['colorbar_extensions_shape_uniform',
3f6380d
                          'colorbar_extensions_shape_proportional'],
3f6380d
-        extensions=['png'])
3f6380d
+        extensions=['png'], tol=0.16)
3f6380d
 def test_colorbar_extension_shape():
3f6380d
     '''Test rectangular colorbar extensions.'''
3f6380d
     # Create figures for uniform and proportionally spaced colorbars.
9046bbb
@@ -107,7 +107,7 @@ def test_colorbar_extension_shape():
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['colorbar_extensions_uniform',
3f6380d
                                    'colorbar_extensions_proportional'],
3f6380d
-                  extensions=['png'])
3f6380d
+                  extensions=['png'], tol=0.25)
3f6380d
 def test_colorbar_extension_length():
3f6380d
     '''Test variable length colorbar extensions.'''
3f6380d
     # Create figures for uniform and proportionally spaced colorbars.
9046bbb
@@ -121,7 +121,7 @@ def test_colorbar_extension_length():
3f6380d
                                    'cbar_sharing',
3f6380d
                                    ],
3f6380d
                   extensions=['png'], remove_text=True,
3f6380d
-                  savefig_kwarg={'dpi': 40})
3f6380d
+                  savefig_kwarg={'dpi': 40}, tol=0.17)
3f6380d
 def test_colorbar_positioning():
3f6380d
     data = np.arange(1200).reshape(30, 40)
3f6380d
     levels = [0, 200, 400, 600, 800, 1000, 1200]
9046bbb
@@ -175,7 +175,7 @@ def test_colorbar_positioning():
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['cbar_with_subplots_adjust'],
3f6380d
                   extensions=['png'], remove_text=True,
3f6380d
-                  savefig_kwarg={'dpi': 40})
3f6380d
+                  savefig_kwarg={'dpi': 40}, tol=0.17)
3f6380d
 def test_gridspec_make_colorbar():
3f6380d
     plt.figure()
3f6380d
     data = np.arange(1200).reshape(30, 40)
9046bbb
@@ -233,7 +233,8 @@ def test_colorbarbase():
3f6380d
 
3f6380d
 @image_comparison(
3f6380d
     baseline_images=['colorbar_closed_patch'],
3f6380d
-    remove_text=True)
3f6380d
+    remove_text=True,
3f6380d
+    tol=0.22)
3f6380d
 def test_colorbar_closed_patch():
3f6380d
     fig = plt.figure(figsize=(8, 6))
3f6380d
     ax1 = fig.add_axes([0.05, 0.85, 0.9, 0.1])
1584487
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
1f37c6a
index e9ae292f6..0edfa1e27 100644
1584487
--- a/lib/matplotlib/tests/test_constrainedlayout.py
1584487
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
1dcb7af
@@ -246,7 +246,7 @@ def test_constrained_layout12():
1584487
     ax.set_xlabel('x-label')
1584487
 
1584487
 
1584487
-@image_comparison(baseline_images=['constrained_layout13'], tol=2.e-2,
1584487
+@image_comparison(baseline_images=['constrained_layout13'], tol=3.e-2,
1584487
         extensions=['png'])
1584487
 def test_constrained_layout13():
1584487
     'Test that padding works.'
3f6380d
diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py
9046bbb
index d78dcb1ff..ad39426e2 100644
3f6380d
--- a/lib/matplotlib/tests/test_contour.py
3f6380d
+++ b/lib/matplotlib/tests/test_contour.py
9046bbb
@@ -226,7 +226,8 @@ def test_given_colors_levels_and_extends():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['contour_datetime_axis'],
1dcb7af
-                  extensions=['png'], remove_text=False, style='mpl20')
1dcb7af
+                  extensions=['png'], remove_text=False, style='mpl20',
1dcb7af
+                  tol=0.18)
3f6380d
 def test_contour_datetime_axis():
3f6380d
     fig = plt.figure()
3f6380d
     fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)
9046bbb
@@ -252,7 +253,8 @@ def test_contour_datetime_axis():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['contour_test_label_transforms'],
1dcb7af
-                  extensions=['png'], remove_text=True, style='mpl20')
1dcb7af
+                  extensions=['png'], remove_text=True, style='mpl20',
1dcb7af
+                  tol=1.38)
3f6380d
 def test_labels():
3f6380d
     # Adapted from pylab_examples example code: contour_demo.py
3f6380d
     # see issues #2475, #2843, and #2818 for explanation
9046bbb
@@ -283,7 +285,7 @@ def test_labels():
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['contour_corner_mask_False',
3f6380d
                                    'contour_corner_mask_True'],
3f6380d
-                  extensions=['png'], remove_text=True)
3f6380d
+                  extensions=['png'], remove_text=True, tol=0.19)
3f6380d
 def test_corner_mask():
3f6380d
     n = 60
3f6380d
     mask_level = 0.95
c385e2c
diff --git a/lib/matplotlib/tests/test_cycles.py b/lib/matplotlib/tests/test_cycles.py
9046bbb
index 1254f3c7c..de11f6103 100644
c385e2c
--- a/lib/matplotlib/tests/test_cycles.py
c385e2c
+++ b/lib/matplotlib/tests/test_cycles.py
9046bbb
@@ -9,7 +9,6 @@ from cycler import cycler
c385e2c
 
c385e2c
 
c385e2c
 @image_comparison(baseline_images=['color_cycle_basic'], remove_text=True,
c385e2c
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
c385e2c
                   extensions=['png'])
c385e2c
 def test_colorcycle_basic():
c385e2c
     fig, ax = plt.subplots()
9046bbb
@@ -27,7 +26,6 @@ def test_colorcycle_basic():
c385e2c
 
c385e2c
 
c385e2c
 @image_comparison(baseline_images=['marker_cycle', 'marker_cycle'],
c385e2c
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
c385e2c
                   remove_text=True, extensions=['png'])
c385e2c
 def test_marker_cycle():
c385e2c
     fig, ax = plt.subplots()
9046bbb
@@ -61,7 +59,6 @@ def test_marker_cycle():
c385e2c
 
c385e2c
 
c385e2c
 @image_comparison(baseline_images=['lineprop_cycle_basic'], remove_text=True,
c385e2c
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
c385e2c
                   extensions=['png'])
c385e2c
 def test_linestylecycle_basic():
c385e2c
     fig, ax = plt.subplots()
c385e2c
diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
9046bbb
index 6ecb3edbe..47aff1b74 100644
c385e2c
--- a/lib/matplotlib/tests/test_figure.py
c385e2c
+++ b/lib/matplotlib/tests/test_figure.py
c385e2c
@@ -13,8 +13,7 @@ import numpy as np
c385e2c
 import pytest
c385e2c
 
c385e2c
 
c385e2c
-@image_comparison(baseline_images=['figure_align_labels'],
c385e2c
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
c385e2c
+@image_comparison(baseline_images=['figure_align_labels'])
c385e2c
 def test_align_labels():
c385e2c
     # Check the figure.align_labels() command
c385e2c
     fig = plt.figure(tight_layout=True)
3f6380d
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
1f37c6a
index 22cd78d46..b4d41f882 100644
3f6380d
--- a/lib/matplotlib/tests/test_image.py
3f6380d
+++ b/lib/matplotlib/tests/test_image.py
9046bbb
@@ -810,7 +810,7 @@ def test_imshow_endianess():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['imshow_masked_interpolation'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.25,
1dcb7af
                   remove_text=True, style='mpl20')
3f6380d
 def test_imshow_masked_interpolation():
3f6380d
 
c385e2c
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
9046bbb
index b4bcecde8..45228e16c 100644
c385e2c
--- a/lib/matplotlib/tests/test_legend.py
c385e2c
+++ b/lib/matplotlib/tests/test_legend.py
c385e2c
@@ -108,7 +108,6 @@ def test_multiple_keys():
c385e2c
 
c385e2c
 
c385e2c
 @image_comparison(baseline_images=['rgba_alpha'],
c385e2c
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
c385e2c
                   extensions=['png'], remove_text=True)
c385e2c
 def test_alpha_rgba():
c385e2c
     import matplotlib.pyplot as plt
c385e2c
@@ -120,7 +119,6 @@ def test_alpha_rgba():
c385e2c
 
c385e2c
 
c385e2c
 @image_comparison(baseline_images=['rcparam_alpha'],
c385e2c
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
c385e2c
                   extensions=['png'], remove_text=True)
c385e2c
 def test_alpha_rcparam():
c385e2c
     import matplotlib.pyplot as plt
c385e2c
@@ -148,8 +146,7 @@ def test_fancy():
c385e2c
                ncol=2, shadow=True, title="My legend", numpoints=1)
c385e2c
 
c385e2c
 
c385e2c
-@image_comparison(baseline_images=['framealpha'], remove_text=True,
c385e2c
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
c385e2c
+@image_comparison(baseline_images=['framealpha'], remove_text=True)
c385e2c
 def test_framealpha():
c385e2c
     x = np.linspace(1, 100, 100)
c385e2c
     y = x
1584487
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
9046bbb
index bbb442638..b5d291c87 100644
1584487
--- a/lib/matplotlib/tests/test_mathtext.py
1584487
+++ b/lib/matplotlib/tests/test_mathtext.py
9046bbb
@@ -173,7 +173,7 @@ def baseline_images(request, fontset, index):
1584487
                          ['cm', 'stix', 'stixsans', 'dejavusans',
1584487
                           'dejavuserif'])
1584487
 @pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)
1584487
-@image_comparison(baseline_images=None)
1584487
+@image_comparison(baseline_images=None, tol=0.31)
9046bbb
 def test_mathtext_rendering(baseline_images, fontset, index, test, recwarn):
1584487
     matplotlib.rcParams['mathtext.fontset'] = fontset
1584487
     fig = plt.figure(figsize=(5.25, 0.75))
9046bbb
@@ -187,7 +187,7 @@ def test_mathtext_rendering(baseline_images, fontset, index, test, recwarn):
1584487
                          ['cm', 'stix', 'stixsans', 'dejavusans',
1584487
                           'dejavuserif'])
1584487
 @pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)
1584487
-@image_comparison(baseline_images=None, extensions=['png'])
1584487
+@image_comparison(baseline_images=None, extensions=['png'], tol=0.3)
9046bbb
 def test_mathfont_rendering(baseline_images, fontset, index, test, recwarn):
1584487
     matplotlib.rcParams['mathtext.fontset'] = fontset
1584487
     fig = plt.figure(figsize=(5.25, 0.75))
1584487
diff --git a/lib/matplotlib/tests/test_patches.py b/lib/matplotlib/tests/test_patches.py
1f37c6a
index 31c240a60..979ab3ad0 100644
1584487
--- a/lib/matplotlib/tests/test_patches.py
1584487
+++ b/lib/matplotlib/tests/test_patches.py
9046bbb
@@ -259,9 +259,8 @@ def test_wedge_movement():
1584487
         assert getattr(w, attr) == new_v
1584487
 
1584487
 
1584487
-# png needs tol>=0.06, pdf tol>=1.617
1584487
 @image_comparison(baseline_images=['wedge_range'],
1584487
-                  remove_text=True, tol=1.65 if on_win else 0)
1584487
+                  remove_text=True)
1584487
 def test_wedge_range():
1584487
     ax = plt.axes()
1584487
 
8d68856
diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py
1dcb7af
index 6e80d8d98..0f158eb9e 100644
8d68856
--- a/lib/matplotlib/tests/test_patheffects.py
8d68856
+++ b/lib/matplotlib/tests/test_patheffects.py
1dcb7af
@@ -119,7 +119,7 @@ def test_SimplePatchShadow_offset():
8d68856
     assert pe._offset == (4, 5)
8d68856
 
8d68856
 
1dcb7af
-@image_comparison(baseline_images=['collection'], tol=0.02, style='mpl20')
1dcb7af
+@image_comparison(baseline_images=['collection'], tol=0.084, style='mpl20')
8d68856
 def test_collection():
8d68856
     x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))
8d68856
     data = np.sin(x) + np.cos(y)
3f6380d
diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py
9046bbb
index d8ee5ffa7..f43a7fd34 100644
3f6380d
--- a/lib/matplotlib/tests/test_pickle.py
3f6380d
+++ b/lib/matplotlib/tests/test_pickle.py
9046bbb
@@ -41,7 +41,7 @@ def test_simple():
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['multi_pickle'],
3f6380d
                   extensions=['png'], remove_text=True,
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.11,
1dcb7af
                   style='mpl20')
3f6380d
 def test_complete():
3f6380d
     fig = plt.figure('Figure with a label?', figsize=(10, 6))
3f6380d
diff --git a/lib/matplotlib/tests/test_quiver.py b/lib/matplotlib/tests/test_quiver.py
9046bbb
index eab049d91..c3708890b 100644
3f6380d
--- a/lib/matplotlib/tests/test_quiver.py
3f6380d
+++ b/lib/matplotlib/tests/test_quiver.py
9046bbb
@@ -155,7 +155,7 @@ def test_quiver_key_xy():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['barbs_test_image'],
3f6380d
-                  extensions=['png'], remove_text=True)
3f6380d
+                  extensions=['png'], remove_text=True, tol=0.11)
3f6380d
 def test_barbs():
3f6380d
     x = np.linspace(-5, 5, 5)
3f6380d
     X, Y = np.meshgrid(x, x)
1584487
diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py
9046bbb
index 6007c9b9a..736105a56 100644
1584487
--- a/lib/matplotlib/tests/test_streamplot.py
1584487
+++ b/lib/matplotlib/tests/test_streamplot.py
1dcb7af
@@ -40,7 +40,7 @@ def test_startpoints():
1584487
 
1584487
 
1dcb7af
 @image_comparison(baseline_images=['streamplot_colormap'],
1dcb7af
-                  tol=.04, remove_text=True, style='mpl20')
1dcb7af
+                  remove_text=True, style='mpl20')
1584487
 def test_colormap():
1584487
     X, Y, U, V = velocity_field()
1584487
     plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,
3f6380d
diff --git a/lib/matplotlib/tests/test_transforms.py b/lib/matplotlib/tests/test_transforms.py
9046bbb
index f36f480af..2b773b042 100644
3f6380d
--- a/lib/matplotlib/tests/test_transforms.py
3f6380d
+++ b/lib/matplotlib/tests/test_transforms.py
1dcb7af
@@ -70,7 +70,7 @@ def test_external_transform_api():
3f6380d
 
3f6380d
 
3f6380d
 @image_comparison(baseline_images=['pre_transform_data'],
1dcb7af
-                  tol=0.08, remove_text=True, style='mpl20')
1dcb7af
+                  tol=0.155, remove_text=True, style='mpl20')
3f6380d
 def test_pre_transform_plotting():
3f6380d
     # a catch-all for as many as possible plot layouts which handle
3f6380d
     # pre-transforming the data NOTE: The axis range is important in this
c385e2c
diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py
9046bbb
index 7d0f38a70..a40d81a4f 100644
c385e2c
--- a/lib/matplotlib/tests/test_units.py
c385e2c
+++ b/lib/matplotlib/tests/test_units.py
9046bbb
@@ -73,7 +73,6 @@ def quantity_converter():
c385e2c
 # Tests that the conversion machinery works properly for classes that
c385e2c
 # work as a facade over numpy arrays (like pint)
c385e2c
 @image_comparison(baseline_images=['plot_pint'],
c385e2c
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
c385e2c
                   extensions=['png'], remove_text=False, style='mpl20')
7424178
 def test_numpy_facade(quantity_converter):
7424178
     # Register the class
1584487
diff --git a/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py b/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py
9046bbb
index 7105a6480..a5fecba1b 100644
1584487
--- a/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py
1584487
+++ b/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py
9046bbb
@@ -19,7 +19,7 @@ def test_subplot():
1584487
 
1584487
 
1584487
 @image_comparison(baseline_images=['curvelinear3'],
1584487
-                  extensions=['png'], style='default', tol=0.01)
1584487
+                  extensions=['png'], style='default', tol=0.02)
1584487
 def test_curvelinear3():
1584487
     fig = plt.figure(figsize=(5, 5))
9046bbb
 
9046bbb
@@ -74,7 +74,7 @@ def test_curvelinear3():
1584487
 
1584487
 
1584487
 @image_comparison(baseline_images=['curvelinear4'],
1dcb7af
-                  extensions=['png'], style='default', tol=0.015)
69d38c5
+                  extensions=['png'], style='default', tol=0.055)
1584487
 def test_curvelinear4():
1584487
     fig = plt.figure(figsize=(5, 5))
9046bbb
 
1584487
diff --git a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
7424178
index 32e1c884d..2b38866c5 100644
1584487
--- a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
1584487
+++ b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
1dcb7af
@@ -17,7 +17,7 @@ from mpl_toolkits.axisartist.grid_helper_curvelinear import \
69d38c5
 
69d38c5
 
69d38c5
 @image_comparison(baseline_images=['custom_transform'],
69d38c5
-                  extensions=['png'], style='default', tol=0.03)
69d38c5
+                  extensions=['png'], style='default', tol=0.035)
69d38c5
 def test_custom_transform():
69d38c5
     class MyTransform(Transform):
69d38c5
         input_dims = 2
1dcb7af
@@ -85,7 +85,7 @@ def test_custom_transform():
1584487
 
1584487
 
1584487
 @image_comparison(baseline_images=['polar_box'],
1dcb7af
-                  tol={'aarch64': 0.04}.get(platform.machine(), 0.03),
1dcb7af
+                  tol=0.08,
1dcb7af
                   extensions=['png'], style='default')
1584487
 def test_polar_box():
1584487
     fig = plt.figure(figsize=(5, 5))
1dcb7af
@@ -147,7 +147,7 @@ def test_polar_box():
1584487
 
1584487
 
1584487
 @image_comparison(baseline_images=['axis_direction'],
1584487
-                  extensions=['png'], style='default', tol=0.03)
1584487
+                  extensions=['png'], style='default', tol=0.05)
1584487
 def test_axis_direction():
1584487
     fig = plt.figure(figsize=(5, 5))
1584487
 
3f6380d
diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py
9046bbb
index 4bfb6f8ff..a6eee9ff6 100644
3f6380d
--- a/lib/mpl_toolkits/tests/test_mplot3d.py
3f6380d
+++ b/lib/mpl_toolkits/tests/test_mplot3d.py
9046bbb
@@ -269,7 +269,7 @@ def test_text3d():
3f6380d
     ax.set_zlabel('Z axis')
3f6380d
 
3f6380d
 
3f6380d
-@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.03)
3f6380d
+@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.05)
3f6380d
 def test_trisurf3d():
3f6380d
     n_angles = 36
3f6380d
     n_radii = 8
9046bbb
@@ -778,7 +778,7 @@ class TestVoxels(object):
1584487
     @image_comparison(
1584487
         baseline_images=['voxels-xyz'],
1584487
         extensions=['png'],
1584487
-        tol=0.01
1584487
+        tol=0.02
1584487
     )
1584487
     def test_xyz(self):
1584487
         fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
3f6380d
-- 
b0c798d
2.21.1
3f6380d