|
|
|
@@ -0,0 +1,648 @@
|
|
|
|
|
From b9342a612e6a3e8b1b8b2bb90b3d0ee30e6c9657 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
|
|
Date: Fri, 24 Jan 2025 04:28:01 -0500
|
|
|
|
|
Subject: [PATCH 6/6] Increase tolerance on more arches
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
|
|
---
|
|
|
|
|
lib/matplotlib/tests/test_arrow_patches.py | 10 ++---
|
|
|
|
|
lib/matplotlib/tests/test_axes.py | 39 +++++++++----------
|
|
|
|
|
lib/matplotlib/tests/test_bbox_tight.py | 2 +-
|
|
|
|
|
lib/matplotlib/tests/test_collections.py | 2 +-
|
|
|
|
|
lib/matplotlib/tests/test_colorbar.py | 2 +-
|
|
|
|
|
.../tests/test_constrainedlayout.py | 2 +-
|
|
|
|
|
lib/matplotlib/tests/test_contour.py | 8 ++--
|
|
|
|
|
lib/matplotlib/tests/test_figure.py | 6 +--
|
|
|
|
|
lib/matplotlib/tests/test_image.py | 2 +-
|
|
|
|
|
lib/matplotlib/tests/test_legend.py | 14 +++----
|
|
|
|
|
lib/matplotlib/tests/test_lines.py | 7 ++--
|
|
|
|
|
lib/matplotlib/tests/test_patches.py | 4 +-
|
|
|
|
|
lib/matplotlib/tests/test_path.py | 4 +-
|
|
|
|
|
lib/matplotlib/tests/test_patheffects.py | 5 ++-
|
|
|
|
|
lib/matplotlib/tests/test_simplification.py | 2 +-
|
|
|
|
|
lib/matplotlib/tests/test_skew.py | 2 +-
|
|
|
|
|
lib/matplotlib/tests/test_subplots.py | 2 +-
|
|
|
|
|
lib/matplotlib/tests/test_units.py | 4 +-
|
|
|
|
|
.../axes_grid1/tests/test_axes_grid1.py | 4 +-
|
|
|
|
|
lib/mpl_toolkits/mplot3d/tests/test_axes3d.py | 9 ++---
|
|
|
|
|
.../mplot3d/tests/test_legend3d.py | 2 +-
|
|
|
|
|
21 files changed, 64 insertions(+), 68 deletions(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_arrow_patches.py b/lib/matplotlib/tests/test_arrow_patches.py
|
|
|
|
|
index 254b86cb54..c90e7399c3 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_arrow_patches.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_arrow_patches.py
|
|
|
|
|
@@ -12,7 +12,7 @@ def draw_arrow(ax, t, r):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['fancyarrow_test_image'],
|
|
|
|
|
- tol=0.012 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.012 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_fancyarrow():
|
|
|
|
|
# Added 0 to test division by zero error described in issue 3930
|
|
|
|
|
r = [0.4, 0.3, 0.2, 0.1, 0]
|
|
|
|
|
@@ -68,7 +68,7 @@ def __prepare_fancyarrow_dpi_cor_test():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['fancyarrow_dpi_cor_100dpi.png'], remove_text=True,
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.02,
|
|
|
|
|
+ tol=0.02 if platform.machine() != 'x86_64' else 0,
|
|
|
|
|
savefig_kwarg=dict(dpi=100))
|
|
|
|
|
def test_fancyarrow_dpi_cor_100dpi():
|
|
|
|
|
"""
|
|
|
|
|
@@ -83,7 +83,7 @@ def test_fancyarrow_dpi_cor_100dpi():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['fancyarrow_dpi_cor_200dpi.png'], remove_text=True,
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.02,
|
|
|
|
|
+ tol=0.02 if platform.machine() != 'x86_64' else 0,
|
|
|
|
|
savefig_kwarg=dict(dpi=200))
|
|
|
|
|
def test_fancyarrow_dpi_cor_200dpi():
|
|
|
|
|
"""
|
|
|
|
|
@@ -116,7 +116,7 @@ def test_fancyarrow_dash():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['arrow_styles.png'], style='mpl20', remove_text=True,
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.02)
|
|
|
|
|
+ tol=0.02 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_arrow_styles():
|
|
|
|
|
styles = mpatches.ArrowStyle.get_styles()
|
|
|
|
|
|
|
|
|
|
@@ -149,7 +149,7 @@ def test_arrow_styles():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['connection_styles.png'], style='mpl20', remove_text=True,
|
|
|
|
|
- tol=0.013 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.013 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_connection_styles():
|
|
|
|
|
styles = mpatches.ConnectionStyle.get_styles()
|
|
|
|
|
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
|
|
|
|
index 522bfd1e07..ea20401ff2 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_axes.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_axes.py
|
|
|
|
|
@@ -243,7 +243,7 @@ def test_matshow(fig_test, fig_ref):
|
|
|
|
|
'formatter_ticker_004',
|
|
|
|
|
'formatter_ticker_005',
|
|
|
|
|
],
|
|
|
|
|
- tol=0.031 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.031 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_formatter_ticker():
|
|
|
|
|
import matplotlib.testing.jpl_units as units
|
|
|
|
|
units.register()
|
|
|
|
|
@@ -444,7 +444,7 @@ def test_twin_logscale(fig_test, fig_ref, twin):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['twin_autoscale.png'],
|
|
|
|
|
- tol=0.009 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.009 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_twinx_axis_scales():
|
|
|
|
|
x = np.array([0, 0.5, 1])
|
|
|
|
|
y = 0.5 * x
|
|
|
|
|
@@ -1218,9 +1218,8 @@ def test_imshow():
|
|
|
|
|
ax.imshow("r", data=data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-@image_comparison(
|
|
|
|
|
- ['imshow_clip'], style='mpl20',
|
|
|
|
|
- tol=1.24 if platform.machine() in ('aarch64', 'arm64', 'ppc64le', 's390x') else 0)
|
|
|
|
|
+@image_comparison(['imshow_clip'], style='mpl20',
|
|
|
|
|
+ tol=1.24 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_imshow_clip():
|
|
|
|
|
# As originally reported by Gellule Xg <gellule.xg@free.fr>
|
|
|
|
|
# use former defaults to match existing baseline image
|
|
|
|
|
@@ -1299,7 +1298,7 @@ def test_fill_betweenx_input(y, x1, x2):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['fill_between_interpolate'], remove_text=True,
|
|
|
|
|
- tol=0.012 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.012 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_fill_between_interpolate():
|
|
|
|
|
x = np.arange(0.0, 2, 0.02)
|
|
|
|
|
y1 = np.sin(2*np.pi*x)
|
|
|
|
|
@@ -1727,7 +1726,8 @@ def test_pcolorauto(fig_test, fig_ref, snap):
|
|
|
|
|
ax.pcolormesh(x2, y2, Z, snap=snap)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-@image_comparison(['canonical'], tol=0.02 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+@image_comparison(['canonical'],
|
|
|
|
|
+ tol=0.02 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_canonical():
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
ax.plot([1, 2, 3])
|
|
|
|
|
@@ -2652,9 +2652,8 @@ def test_contour_hatching():
|
|
|
|
|
extend='both', alpha=0.5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-@image_comparison(
|
|
|
|
|
- ['contour_colorbar'], style='mpl20',
|
|
|
|
|
- tol=0.54 if platform.machine() in ('aarch64', 'arm64', 'ppc64le', 's390x') else 0)
|
|
|
|
|
+@image_comparison(['contour_colorbar'], style='mpl20',
|
|
|
|
|
+ tol=0.54 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_contour_colorbar():
|
|
|
|
|
x, y, z = contour_dat()
|
|
|
|
|
|
|
|
|
|
@@ -3183,7 +3182,7 @@ def test_log_scales_invalid():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['stackplot_test_image', 'stackplot_test_image'],
|
|
|
|
|
- tol=0.031 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.031 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_stackplot():
|
|
|
|
|
fig = plt.figure()
|
|
|
|
|
x = np.linspace(0, 10, 10)
|
|
|
|
|
@@ -5059,7 +5058,7 @@ def test_marker_styles():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['rc_markerfill.png'],
|
|
|
|
|
- tol=0.037 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.037 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_markers_fillstyle_rcparams():
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
x = np.arange(7)
|
|
|
|
|
@@ -5082,7 +5081,7 @@ def test_vertex_markers():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['vline_hline_zorder', 'errorbar_zorder'],
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.026)
|
|
|
|
|
+ tol=0.026 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_eb_line_zorder():
|
|
|
|
|
x = list(range(10))
|
|
|
|
|
|
|
|
|
|
@@ -5642,7 +5641,7 @@ def test_twin_remove(fig_test, fig_ref):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['twin_spines.png'], remove_text=True,
|
|
|
|
|
- tol=0.022 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.022 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_twin_spines():
|
|
|
|
|
|
|
|
|
|
def make_patch_spines_invisible(ax):
|
|
|
|
|
@@ -6239,7 +6238,7 @@ def test_pie_hatch_multi(fig_test, fig_ref):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['set_get_ticklabels.png'],
|
|
|
|
|
- tol=0.025 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.025 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_set_get_ticklabels():
|
|
|
|
|
# test issue 2246
|
|
|
|
|
fig, ax = plt.subplots(2)
|
|
|
|
|
@@ -6832,7 +6831,7 @@ def test_loglog():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(["test_loglog_nonpos.png"], remove_text=True, style='mpl20',
|
|
|
|
|
- tol=0.029 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.029 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_loglog_nonpos():
|
|
|
|
|
fig, axs = plt.subplots(3, 3)
|
|
|
|
|
x = np.arange(1, 11)
|
|
|
|
|
@@ -7772,7 +7771,7 @@ def test_scatter_empty_data():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['annotate_across_transforms.png'], style='mpl20', remove_text=True,
|
|
|
|
|
- tol=0.025 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.025 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_annotate_across_transforms():
|
|
|
|
|
x = np.linspace(0, 10, 200)
|
|
|
|
|
y = np.exp(-x) * np.sin(x)
|
|
|
|
|
@@ -7803,7 +7802,7 @@ class _Translation(mtransforms.Transform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['secondary_xy.png'], style='mpl20',
|
|
|
|
|
- tol=0.027 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.027 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_secondary_xy():
|
|
|
|
|
fig, axs = plt.subplots(1, 2, figsize=(10, 5), constrained_layout=True)
|
|
|
|
|
|
|
|
|
|
@@ -9067,7 +9066,7 @@ def test_zorder_and_explicit_rasterization():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(["preset_clip_paths.png"], remove_text=True, style="mpl20",
|
|
|
|
|
- tol=0.027 if platform.machine() == "arm64" else 0)
|
|
|
|
|
+ tol=0.027 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_preset_clip_paths():
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
|
|
|
|
|
@@ -9400,7 +9399,7 @@ def test_boxplot_orientation(fig_test, fig_ref):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(["use_colorizer_keyword.png"],
|
|
|
|
|
- tol=0.05 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.05 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_use_colorizer_keyword():
|
|
|
|
|
# test using the colorizer keyword
|
|
|
|
|
np.random.seed(0)
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_bbox_tight.py b/lib/matplotlib/tests/test_bbox_tight.py
|
|
|
|
|
index 5f2b397b65..eabe9576e1 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_bbox_tight.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_bbox_tight.py
|
|
|
|
|
@@ -45,7 +45,7 @@ def test_bbox_inches_tight():
|
|
|
|
|
|
|
|
|
|
@image_comparison(['bbox_inches_tight_suptile_legend'],
|
|
|
|
|
savefig_kwarg={'bbox_inches': 'tight'},
|
|
|
|
|
- tol=0.02 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.02 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_bbox_inches_tight_suptile_legend():
|
|
|
|
|
plt.plot(np.arange(10), label='a straight line')
|
|
|
|
|
plt.legend(bbox_to_anchor=(0.9, 1), loc='upper left')
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py
|
|
|
|
|
index 11934cfca2..a8cb186479 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_collections.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_collections.py
|
|
|
|
|
@@ -391,7 +391,7 @@ def test_barb_limits():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['EllipseCollection_test_image.png'], remove_text=True,
|
|
|
|
|
- tol=0.021 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.021 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_EllipseCollection():
|
|
|
|
|
# Test basic functionality
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py
|
|
|
|
|
index 24eeab6894..f494d088bc 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_colorbar.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_colorbar.py
|
|
|
|
|
@@ -235,7 +235,7 @@ def test_colorbar_single_ax_panchor_east(constrained):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['contour_colorbar.png'], remove_text=True,
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.054)
|
|
|
|
|
+ tol=0.054 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_contour_colorbar():
|
|
|
|
|
fig, ax = plt.subplots(figsize=(4, 2))
|
|
|
|
|
data = np.arange(1200).reshape(30, 40) - 500
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
|
|
|
|
index d8b59a25d4..3b92dd1f8a 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
|
|
|
|
@@ -198,7 +198,7 @@ def test_constrained_layout9():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['constrained_layout10.png'],
|
|
|
|
|
- tol=0.032 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.032 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_constrained_layout10():
|
|
|
|
|
"""Test for handling legend outside axis"""
|
|
|
|
|
fig, axs = plt.subplots(2, 2, layout="constrained")
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py
|
|
|
|
|
index e0ea82973a..0f56e441bd 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_contour.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_contour.py
|
|
|
|
|
@@ -140,7 +140,7 @@ def test_contour_label_with_disconnected_segments():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['contour_manual_colors_and_levels.png'], remove_text=True,
|
|
|
|
|
- tol=0.018 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.018 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_given_colors_levels_and_extends():
|
|
|
|
|
# Remove this line when this test image is regenerated.
|
|
|
|
|
plt.rcParams['pcolormesh.snap'] = False
|
|
|
|
|
@@ -416,10 +416,8 @@ def test_contourf_log_extension():
|
|
|
|
|
cb = plt.colorbar(c3, ax=ax3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-@image_comparison(
|
|
|
|
|
- ['contour_addlines.png'], remove_text=True, style='mpl20',
|
|
|
|
|
- tol=0.15 if platform.machine() in ('aarch64', 'arm64', 'ppc64le', 's390x')
|
|
|
|
|
- else 0.03)
|
|
|
|
|
+@image_comparison(['contour_addlines.png'], remove_text=True, style='mpl20',
|
|
|
|
|
+ tol=0.15 if platform.machine() != 'x86_64' else 0.03)
|
|
|
|
|
# tolerance is because image changed minutely when tick finding on
|
|
|
|
|
# colorbars was cleaned up...
|
|
|
|
|
def test_contour_addlines():
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
|
|
|
|
|
index edf5ea05f1..d75c365bf7 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_figure.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_figure.py
|
|
|
|
|
@@ -26,7 +26,7 @@ import matplotlib.dates as mdates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['figure_align_labels'], extensions=['png', 'svg'],
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.01)
|
|
|
|
|
+ tol=0.01 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_align_labels():
|
|
|
|
|
fig = plt.figure(layout='tight')
|
|
|
|
|
gs = gridspec.GridSpec(3, 3)
|
|
|
|
|
@@ -68,7 +68,7 @@ def test_align_labels():
|
|
|
|
|
|
|
|
|
|
@image_comparison(['figure_align_titles_tight.png',
|
|
|
|
|
'figure_align_titles_constrained.png'],
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.022,
|
|
|
|
|
+ tol=0.022 if platform.machine() != 'x86_64' else 0,
|
|
|
|
|
style='mpl20')
|
|
|
|
|
def test_align_titles():
|
|
|
|
|
for layout in ['tight', 'constrained']:
|
|
|
|
|
@@ -210,7 +210,7 @@ def test_clf_keyword():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['figure_today'],
|
|
|
|
|
- tol=0.015 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.015 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_figure():
|
|
|
|
|
# named figure support
|
|
|
|
|
fig = plt.figure('today')
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
|
|
|
|
|
index 24a0ab929b..168bae8a82 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_image.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_image.py
|
|
|
|
|
@@ -925,7 +925,7 @@ def test_imshow_endianess():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['imshow_masked_interpolation'],
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.01,
|
|
|
|
|
+ tol=0.01 if platform.machine() != 'x86_64' else 0,
|
|
|
|
|
remove_text=True, style='mpl20')
|
|
|
|
|
def test_imshow_masked_interpolation():
|
|
|
|
|
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
|
|
|
|
|
index e4a2f63995..615001a3a9 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_legend.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_legend.py
|
|
|
|
|
@@ -139,7 +139,7 @@ def test_various_labels():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['legend_labels_first.png'], remove_text=True,
|
|
|
|
|
- tol=0.013 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.013 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_labels_first():
|
|
|
|
|
# test labels to left of markers
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
@@ -150,7 +150,7 @@ def test_labels_first():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['legend_multiple_keys.png'], remove_text=True,
|
|
|
|
|
- tol=0.013 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.013 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_multiple_keys():
|
|
|
|
|
# test legend entries with multiple keys
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
@@ -164,7 +164,7 @@ def test_multiple_keys():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['rgba_alpha.png'], remove_text=True,
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.03)
|
|
|
|
|
+ tol=0.03 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_alpha_rgba():
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
ax.plot(range(10), lw=5)
|
|
|
|
|
@@ -173,7 +173,7 @@ def test_alpha_rgba():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['rcparam_alpha.png'], remove_text=True,
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.03)
|
|
|
|
|
+ tol=0.03 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_alpha_rcparam():
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
ax.plot(range(10), lw=5)
|
|
|
|
|
@@ -201,7 +201,7 @@ def test_fancy():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['framealpha'], remove_text=True,
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.024)
|
|
|
|
|
+ tol=0.024 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_framealpha():
|
|
|
|
|
x = np.linspace(1, 100, 100)
|
|
|
|
|
y = x
|
|
|
|
|
@@ -513,7 +513,7 @@ def test_figure_legend_outside():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['legend_stackplot.png'],
|
|
|
|
|
- tol=0.031 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.031 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_legend_stackplot():
|
|
|
|
|
"""Test legend for PolyCollection using stackplot."""
|
|
|
|
|
# related to #1341, #1943, and PR #3303
|
|
|
|
|
@@ -649,7 +649,7 @@ def test_empty_bar_chart_with_legend():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['shadow_argument_types.png'], remove_text=True, style='mpl20',
|
|
|
|
|
- tol=0.028 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.028 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_shadow_argument_types():
|
|
|
|
|
# Test that different arguments for shadow work as expected
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_lines.py b/lib/matplotlib/tests/test_lines.py
|
|
|
|
|
index ee8b5b4aaa..43f0f73932 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_lines.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_lines.py
|
|
|
|
|
@@ -140,7 +140,7 @@ def test_valid_linestyles():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['drawstyle_variants.png'], remove_text=True,
|
|
|
|
|
- tol=0.03 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.03 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_drawstyle_variants():
|
|
|
|
|
fig, axs = plt.subplots(6)
|
|
|
|
|
dss = ["default", "steps-mid", "steps-pre", "steps-post", "steps", None]
|
|
|
|
|
@@ -183,9 +183,8 @@ def test_set_drawstyle():
|
|
|
|
|
assert len(line.get_path().vertices) == len(x)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-@image_comparison(
|
|
|
|
|
- ['line_collection_dashes'], remove_text=True, style='mpl20',
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.65)
|
|
|
|
|
+@image_comparison(['line_collection_dashes'], remove_text=True, style='mpl20',
|
|
|
|
|
+ tol=0.65 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_set_line_coll_dash_image():
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
np.random.seed(0)
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_patches.py b/lib/matplotlib/tests/test_patches.py
|
|
|
|
|
index 9cb67616a9..84ffa89ba1 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_patches.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_patches.py
|
|
|
|
|
@@ -438,7 +438,7 @@ def test_wedge_movement():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['wedge_range'], remove_text=True,
|
|
|
|
|
- tol=0.009 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.009 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_wedge_range():
|
|
|
|
|
ax = plt.axes()
|
|
|
|
|
|
|
|
|
|
@@ -564,7 +564,7 @@ def test_units_rectangle():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['connection_patch.png'], style='mpl20', remove_text=True,
|
|
|
|
|
- tol=0.024 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.024 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_connection_patch():
|
|
|
|
|
fig, (ax1, ax2) = plt.subplots(1, 2)
|
|
|
|
|
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_path.py b/lib/matplotlib/tests/test_path.py
|
|
|
|
|
index 2c4df6ea3b..db54709e04 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_path.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_path.py
|
|
|
|
|
@@ -151,7 +151,7 @@ def test_nonlinear_containment():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['arrow_contains_point.png'], remove_text=True, style='mpl20',
|
|
|
|
|
- tol=0.027 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.027 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_arrow_contains_point():
|
|
|
|
|
# fix bug (#8384)
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
@@ -283,7 +283,7 @@ def test_marker_paths_pdf():
|
|
|
|
|
|
|
|
|
|
@image_comparison(['nan_path'], style='default', remove_text=True,
|
|
|
|
|
extensions=['pdf', 'svg', 'eps', 'png'],
|
|
|
|
|
- tol=0.009 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.009 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_nan_isolated_points():
|
|
|
|
|
|
|
|
|
|
y0 = [0, np.nan, 2, np.nan, 4, 5, 6]
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py
|
|
|
|
|
index bf067b2abb..ad1d6457d3 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_patheffects.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_patheffects.py
|
|
|
|
|
@@ -30,7 +30,7 @@ def test_patheffect1():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['patheffect2'], remove_text=True, style='mpl20',
|
|
|
|
|
- tol=0.06 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.06 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_patheffect2():
|
|
|
|
|
|
|
|
|
|
ax2 = plt.subplot()
|
|
|
|
|
@@ -45,7 +45,8 @@ def test_patheffect2():
|
|
|
|
|
foreground="w")])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-@image_comparison(['patheffect3'], tol=0.019 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+@image_comparison(['patheffect3'],
|
|
|
|
|
+ tol=0.019 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_patheffect3():
|
|
|
|
|
p1, = plt.plot([1, 3, 5, 4, 3], 'o-b', lw=4)
|
|
|
|
|
p1.set_path_effects([path_effects.SimpleLineShadow(),
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_simplification.py b/lib/matplotlib/tests/test_simplification.py
|
|
|
|
|
index a052c24cb6..5a53429ed9 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_simplification.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_simplification.py
|
|
|
|
|
@@ -29,7 +29,7 @@ def test_clipping():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['overflow'], remove_text=True,
|
|
|
|
|
- tol=0.007 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.007 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_overflow():
|
|
|
|
|
x = np.array([1.0, 2.0, 3.0, 2.0e5])
|
|
|
|
|
y = np.arange(len(x))
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_skew.py b/lib/matplotlib/tests/test_skew.py
|
|
|
|
|
index fd7e7cebfa..0ee091babe 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_skew.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_skew.py
|
|
|
|
|
@@ -146,7 +146,7 @@ def test_set_line_coll_dash_image():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['skew_rects'], remove_text=True,
|
|
|
|
|
- tol=0.009 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.009 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_skew_rectangle():
|
|
|
|
|
|
|
|
|
|
fix, axes = plt.subplots(5, 5, sharex=True, sharey=True, figsize=(8, 8))
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_subplots.py b/lib/matplotlib/tests/test_subplots.py
|
|
|
|
|
index 70215c9531..8162bd0ba7 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_subplots.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_subplots.py
|
|
|
|
|
@@ -175,7 +175,7 @@ def test_exceptions():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['subplots_offset_text'],
|
|
|
|
|
- tol=0.028 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.028 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_subplots_offsettext():
|
|
|
|
|
x = np.arange(0, 1e10, 1e9)
|
|
|
|
|
y = np.arange(0, 100, 10)+1e4
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py
|
|
|
|
|
index cc71f68585..7b83fc860b 100644
|
|
|
|
|
--- a/lib/matplotlib/tests/test_units.py
|
|
|
|
|
+++ b/lib/matplotlib/tests/test_units.py
|
|
|
|
|
@@ -81,7 +81,7 @@ def quantity_converter():
|
|
|
|
|
# Tests that the conversion machinery works properly for classes that
|
|
|
|
|
# work as a facade over numpy arrays (like pint)
|
|
|
|
|
@image_comparison(['plot_pint.png'], style='mpl20',
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.03)
|
|
|
|
|
+ tol=0.03 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_numpy_facade(quantity_converter):
|
|
|
|
|
# use former defaults to match existing baseline image
|
|
|
|
|
plt.rcParams['axes.formatter.limits'] = -7, 7
|
|
|
|
|
@@ -108,7 +108,7 @@ def test_numpy_facade(quantity_converter):
|
|
|
|
|
|
|
|
|
|
# Tests gh-8908
|
|
|
|
|
@image_comparison(['plot_masked_units.png'], remove_text=True, style='mpl20',
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.02)
|
|
|
|
|
+ tol=0.02 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_plot_masked_units():
|
|
|
|
|
data = np.linspace(-5, 5)
|
|
|
|
|
data_masked = np.ma.array(data, mask=(data > -2) & (data < 2))
|
|
|
|
|
diff --git a/lib/mpl_toolkits/axes_grid1/tests/test_axes_grid1.py b/lib/mpl_toolkits/axes_grid1/tests/test_axes_grid1.py
|
|
|
|
|
index 778bd9ca04..547aa5d814 100644
|
|
|
|
|
--- a/lib/mpl_toolkits/axes_grid1/tests/test_axes_grid1.py
|
|
|
|
|
+++ b/lib/mpl_toolkits/axes_grid1/tests/test_axes_grid1.py
|
|
|
|
|
@@ -346,7 +346,7 @@ def test_fill_facecolor():
|
|
|
|
|
# Update style when regenerating the test image
|
|
|
|
|
@image_comparison(['zoomed_axes.png', 'inverted_zoomed_axes.png'],
|
|
|
|
|
style=('classic', '_classic_test_patch'),
|
|
|
|
|
- tol=0.02 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.02 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_zooming_with_inverted_axes():
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
ax.plot([1, 2, 3], [1, 2, 3])
|
|
|
|
|
@@ -363,7 +363,7 @@ def test_zooming_with_inverted_axes():
|
|
|
|
|
|
|
|
|
|
# Update style when regenerating the test image
|
|
|
|
|
@image_comparison(['anchored_direction_arrows.png'],
|
|
|
|
|
- tol=0 if platform.machine() == 'x86_64' else 0.01,
|
|
|
|
|
+ tol=0.01 if platform.machine() != 'x86_64' else 0,
|
|
|
|
|
style=('classic', '_classic_test_patch'))
|
|
|
|
|
def test_anchored_direction_arrows():
|
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
|
diff --git a/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py b/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py
|
|
|
|
|
index ad952e4395..96b405be1c 100644
|
|
|
|
|
--- a/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py
|
|
|
|
|
+++ b/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py
|
|
|
|
|
@@ -221,9 +221,8 @@ def test_bar3d_lightsource():
|
|
|
|
|
np.testing.assert_array_max_ulp(color, collection._facecolor3d[1::6], 4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-@mpl3d_image_comparison(
|
|
|
|
|
- ['contour3d.png'], style='mpl20',
|
|
|
|
|
- tol=0.002 if platform.machine() in ('aarch64', 'arm64', 'ppc64le', 's390x') else 0)
|
|
|
|
|
+@mpl3d_image_comparison(['contour3d.png'], style='mpl20',
|
|
|
|
|
+ tol=0.002 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_contour3d():
|
|
|
|
|
plt.rcParams['axes3d.automargin'] = True # Remove when image is regenerated
|
|
|
|
|
fig = plt.figure()
|
|
|
|
|
@@ -1713,7 +1712,7 @@ def test_errorbar3d_errorevery():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@mpl3d_image_comparison(['errorbar3d.png'], style='mpl20',
|
|
|
|
|
- tol=0.02 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.02 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_errorbar3d():
|
|
|
|
|
"""Tests limits, color styling, and legend for 3D errorbars."""
|
|
|
|
|
fig = plt.figure()
|
|
|
|
|
@@ -1729,7 +1728,7 @@ def test_errorbar3d():
|
|
|
|
|
ax.legend()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-@image_comparison(['stem3d.png'], style='mpl20', tol=0.008)
|
|
|
|
|
+@image_comparison(['stem3d.png'], style='mpl20', tol=0.009)
|
|
|
|
|
def test_stem3d():
|
|
|
|
|
plt.rcParams['axes3d.automargin'] = True # Remove when image is regenerated
|
|
|
|
|
fig, axs = plt.subplots(2, 3, figsize=(8, 6),
|
|
|
|
|
diff --git a/lib/mpl_toolkits/mplot3d/tests/test_legend3d.py b/lib/mpl_toolkits/mplot3d/tests/test_legend3d.py
|
|
|
|
|
index 0935bbe7f6..cb669a5caa 100644
|
|
|
|
|
--- a/lib/mpl_toolkits/mplot3d/tests/test_legend3d.py
|
|
|
|
|
+++ b/lib/mpl_toolkits/mplot3d/tests/test_legend3d.py
|
|
|
|
|
@@ -28,7 +28,7 @@ def test_legend_bar():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@image_comparison(['fancy.png'], remove_text=True, style='mpl20',
|
|
|
|
|
- tol=0.011 if platform.machine() == 'arm64' else 0)
|
|
|
|
|
+ tol=0.011 if platform.machine() != 'x86_64' else 0)
|
|
|
|
|
def test_fancy():
|
|
|
|
|
fig, ax = plt.subplots(subplot_kw=dict(projection='3d'))
|
|
|
|
|
ax.plot(np.arange(10), np.full(10, 5), np.full(10, 5), 'o--', label='line')
|
|
|
|
|
--
|
|
|
|
|
2.47.0
|
|
|
|
|
|