Update to latest version (#2348860)

This commit is contained in:
Elliott Sales de Andrade
2025-05-09 21:29:37 -04:00
parent b69289819e
commit 5d73432d40
9 changed files with 41 additions and 762 deletions
+2
View File
@@ -117,3 +117,5 @@ matplotlib-1.0.0-without-gpc.tar.gz
/matplotlib-3.9.4.tar.gz
/matplotlib-3.10.0.tar.gz
/matplotlib-3.10.0-with-freetype-2.13.1.tar.gz
/matplotlib-3.10.3.tar.gz
/matplotlib-3.10.3-with-freetype-2.13.1.tar.gz
+3 -3
View File
@@ -1,7 +1,7 @@
From e47d30f3ab1eddcf9e7966f73262e80cc8bc7487 Mon Sep 17 00:00:00 2001
From 37007fd04ff67cf7c766aa6cd4fa9e564841cb17 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 27 Sep 2017 19:35:59 -0400
Subject: [PATCH 1/6] matplotlibrc path search fix
Subject: [PATCH 1/5] matplotlibrc path search fix
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
@@ -39,5 +39,5 @@ index 5f964e0b34..f82d92466a 100644
for fname in gen_candidates():
--
2.47.0
2.49.0
@@ -1,20 +1,18 @@
From a351cfcbc8b9a7c9e7854b461647b291e28c1988 Mon Sep 17 00:00:00 2001
From 944d5021f46735045a69af1e57ff0bb0c43e7fbb Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 14 Feb 2020 06:05:42 -0500
Subject: [PATCH 2/6] Set FreeType version to 2.13.1 and update tolerances
Subject: [PATCH 2/5] Set FreeType version to 2.13.1 and update tolerances
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
extern/meson.build | 2 +-
lib/matplotlib/__init__.py | 2 +-
lib/matplotlib/tests/test_axes.py | 4 ++--
lib/matplotlib/tests/test_backend_pgf.py | 2 +-
lib/matplotlib/tests/test_constrainedlayout.py | 12 ++++++------
lib/matplotlib/tests/test_ft2font.py | 6 +++---
lib/matplotlib/tests/test_legend.py | 4 ++--
lib/matplotlib/tests/test_polar.py | 2 +-
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
9 files changed, 22 insertions(+), 22 deletions(-)
extern/meson.build | 2 +-
lib/matplotlib/__init__.py | 2 +-
lib/matplotlib/tests/test_axes.py | 4 ++--
lib/matplotlib/tests/test_backend_pgf.py | 2 +-
lib/matplotlib/tests/test_ft2font.py | 6 +++---
lib/matplotlib/tests/test_legend.py | 4 ++--
lib/matplotlib/tests/test_polar.py | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/extern/meson.build b/extern/meson.build
index 5463183a90..c7233815af 100644
@@ -43,10 +41,10 @@ index f82d92466a..c0551b5b5f 100644
from matplotlib import ft2font
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index e9218bc825..522bfd1e07 100644
index e3fc1ada99..28870ea736 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -7971,7 +7971,7 @@ def test_normal_axes():
@@ -8065,7 +8065,7 @@ def test_normal_axes():
]
for nn, b in enumerate(bbaxis):
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
@@ -55,7 +53,7 @@ index e9218bc825..522bfd1e07 100644
target = [
[150.0, 119.999, 930.0, 11.111],
@@ -7989,7 +7989,7 @@ def test_normal_axes():
@@ -8083,7 +8083,7 @@ def test_normal_axes():
target = [85.5138, 75.88888, 1021.11, 1017.11]
targetbb = mtransforms.Bbox.from_bounds(*target)
@@ -77,58 +75,11 @@ index e218a81cdc..839ad724e1 100644
def test_mixedmode():
mpl.rcParams.update({'font.family': 'serif', 'pgf.rcfonts': False})
Y, X = np.ogrid[-1:1:40j, -1:1:40j]
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
index e42e2ee9bf..d8b59a25d4 100644
--- a/lib/matplotlib/tests/test_constrainedlayout.py
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
@@ -435,7 +435,7 @@ def test_hidden_axes():
extents1 = np.copy(axs[0, 0].get_position().extents)
np.testing.assert_allclose(
- extents1, [0.045552, 0.543288, 0.47819, 0.982638], rtol=1e-5)
+ extents1, [0.045552, 0.543288, 0.47819, 0.982638], rtol=1e-2)
def test_colorbar_align():
@@ -641,9 +641,9 @@ def test_compressed1():
fig.draw_without_rendering()
pos = axs[0, 0].get_position()
- np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-3)
+ np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-2)
pos = axs[0, 1].get_position()
- np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-3)
+ np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-2)
# wider than tall
fig, axs = plt.subplots(2, 3, layout='compressed',
@@ -656,10 +656,10 @@ def test_compressed1():
pos = axs[0, 0].get_position()
np.testing.assert_allclose(pos.x0, 0.06195, atol=1e-3)
- np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-3)
+ np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-2)
pos = axs[1, 2].get_position()
np.testing.assert_allclose(pos.x1, 0.8618, atol=1e-3)
- np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-3)
+ np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-2)
def test_compressed_suptitle():
@@ -675,7 +675,7 @@ def test_compressed_suptitle():
title = fig.suptitle("Title")
fig.draw_without_rendering()
- assert title.get_position()[1] == pytest.approx(0.7457, abs=1e-3)
+ assert title.get_position()[1] == pytest.approx(0.7457, abs=1e-2)
title = fig.suptitle("Title", y=0.98)
fig.draw_without_rendering()
diff --git a/lib/matplotlib/tests/test_ft2font.py b/lib/matplotlib/tests/test_ft2font.py
index 7dc851b2c9..cf72a31568 100644
index 6ba23bab34..0aee3222f1 100644
--- a/lib/matplotlib/tests/test_ft2font.py
+++ b/lib/matplotlib/tests/test_ft2font.py
@@ -703,10 +703,10 @@ def test_ft2font_get_sfnt_table(font_name, header):
@@ -706,10 +706,10 @@ def test_ft2font_get_sfnt_table(font_name, header):
@pytest.mark.parametrize('left, right, unscaled, unfitted, default', [
# These are all the same class.
@@ -143,10 +94,10 @@ index 7dc851b2c9..cf72a31568 100644
])
def test_ft2font_get_kerning(left, right, unscaled, unfitted, default):
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
index 61892378bd..e4a2f63995 100644
index 5e69044866..0b6413e97f 100644
--- a/lib/matplotlib/tests/test_legend.py
+++ b/lib/matplotlib/tests/test_legend.py
@@ -507,9 +507,9 @@ def test_figure_legend_outside():
@@ -508,9 +508,9 @@ def test_figure_legend_outside():
fig.draw_without_rendering()
assert_allclose(axs.get_window_extent().extents,
@@ -159,10 +110,10 @@ index 61892378bd..e4a2f63995 100644
@image_comparison(['legend_stackplot.png'],
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
index ee38c88a12..f1945b3d2e 100644
index 87c8efe304..af5f2d2c6a 100644
--- a/lib/matplotlib/tests/test_polar.py
+++ b/lib/matplotlib/tests/test_polar.py
@@ -321,7 +321,7 @@ def test_get_tightbbox_polar():
@@ -328,7 +328,7 @@ def test_get_tightbbox_polar():
fig.canvas.draw()
bb = ax.get_tightbbox(fig.canvas.get_renderer())
assert_allclose(
@@ -171,29 +122,6 @@ index ee38c88a12..f1945b3d2e 100644
@check_figures_equal(extensions=["png"])
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
index 9c654f4d1f..9678e34a80 100644
--- a/lib/matplotlib/tests/test_tightlayout.py
+++ b/lib/matplotlib/tests/test_tightlayout.py
@@ -174,13 +174,13 @@ def test_outward_ticks():
# These values were obtained after visual checking that they correspond
# to a tight layouting that did take the ticks into account.
expected = [
- [[0.091, 0.607], [0.433, 0.933]],
- [[0.579, 0.607], [0.922, 0.933]],
- [[0.091, 0.140], [0.433, 0.466]],
- [[0.579, 0.140], [0.922, 0.466]],
+ [[0.09, 0.61], [0.43, 0.93]],
+ [[0.58, 0.61], [0.92, 0.93]],
+ [[0.09, 0.14], [0.43, 0.47]],
+ [[0.58, 0.14], [0.92, 0.47]],
]
for nn, ax in enumerate(fig.axes):
- assert_array_equal(np.round(ax.get_position().get_points(), 3),
+ assert_array_equal(np.round(ax.get_position().get_points(), 2),
expected[nn])
--
2.47.0
2.49.0
@@ -1,7 +1,7 @@
From 60e5eb975843f9b590aa35df80178d28eecd1d82 Mon Sep 17 00:00:00 2001
From 814405dd99896a362bdd18b42e591d6594e59dcf Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 13 Dec 2024 02:03:33 -0500
Subject: [PATCH 3/6] Unpin meson-python build requirement
Subject: [PATCH 3/5] Unpin meson-python build requirement
This is pinned to fix sdists, but we already have one and are building a
wheel, which should be fine.
@@ -12,10 +12,10 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 832d76308e..5451e972de 100644
index e6d1abaf53..76755eec25 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -46,7 +46,7 @@ requires-python = ">=3.10"
@@ -47,7 +47,7 @@ requires-python = ">=3.10"
[project.optional-dependencies]
# Should be a copy of the build dependencies below.
dev = [
@@ -24,7 +24,7 @@ index 832d76308e..5451e972de 100644
"pybind11>=2.13.2,!=2.13.3",
"setuptools_scm>=7",
# Not required by us but setuptools_scm without a version, cso _if_
@@ -70,7 +70,7 @@ dev = [
@@ -71,7 +71,7 @@ dev = [
build-backend = "mesonpy"
# Also keep in sync with optional dependencies above.
requires = [
@@ -34,5 +34,5 @@ index 832d76308e..5451e972de 100644
"setuptools_scm>=7",
]
--
2.47.0
2.49.0
@@ -1,7 +1,7 @@
From ae023d1e792b356b0105d23ebecec4f2747457d7 Mon Sep 17 00:00:00 2001
From 97f398b19278f450ffdcecf8443489ec981321a4 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 22 Aug 2022 18:43:28 -0400
Subject: [PATCH 4/6] Use old stride_windows implementation on 32-bit x86
Subject: [PATCH 4/5] Use old stride_windows implementation on 32-bit x86
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
@@ -80,5 +80,5 @@ index 8326ac186e..bdaa34b734 100644
resultY = resultY * window.reshape((-1, 1))
resultY = np.fft.fft(resultY, n=pad_to, axis=0)[:numFreqs, :]
--
2.47.0
2.49.0
@@ -1,7 +1,7 @@
From 8111678582e4495e4d011c8a7cca4cd5cc636635 Mon Sep 17 00:00:00 2001
From 236b1b8164088b2b9ac85b5d83e9d6cf41269935 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Tue, 12 Nov 2024 01:05:25 -0500
Subject: [PATCH 5/6] Partially revert "TST: Fix minor issues in interactive
Subject: [PATCH 5/5] Partially revert "TST: Fix minor issues in interactive
backend test (#28838)"
This reverts commit 7c7f94c5f71e99f148255e3bb570fec25c8fe754.
@@ -28,5 +28,5 @@ index 063c72e2cd..5dd53440f7 100644
@pytest.mark.parametrize("env", _get_testable_interactive_backends())
--
2.47.0
2.49.0
@@ -1,648 +0,0 @@
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
+2 -5
View File
@@ -32,13 +32,13 @@
%global _docdir_fmt %{name}
# Updated test images for new FreeType.
%global mpl_images_version 3.10.0
%global mpl_images_version 3.10.3
# The version of FreeType in this Fedora branch.
%global ftver 2.13.1
Name: python-matplotlib
Version: 3.10.0
Version: 3.10.3
%global Version %{version_no_tilde %{quote:%nil}}
Release: %autorelease
Summary: Python 2D plotting library
@@ -65,9 +65,6 @@ Patch0001: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch
# Temporary fix for some tests.
Patch0002: 0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch
# https://github.com/matplotlib/matplotlib/pull/29518
Patch0003: 0006-Increase-tolerance-on-more-arches.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: glibc-langpack-en
+2 -2
View File
@@ -1,2 +1,2 @@
SHA512 (matplotlib-3.10.0.tar.gz) = 31a71640ef9cbc8cae928156c70119a0bdc1a8c44c8dc5af5333f5484525dd6a375e6f263d739ad3422b0e35d474f7742e08c71c40df0f1f71b526e21adc17e1
SHA512 (matplotlib-3.10.0-with-freetype-2.13.1.tar.gz) = c32e7b1bfc6712cc7496aabf559892f938c7724ec64f806683eb6db6493832506fe77202c2e07355e233d254b9784d9d5bfb50a97c3db5a618f5592d646e4041
SHA512 (matplotlib-3.10.3.tar.gz) = c3027fa116f45a4a7d7ac8e7ce87f509a6604b283c39b74379e8d84a05df61283ddf4e79036c9b83b2dff13291b59945d26aeb7420873d3b275097817a12be72
SHA512 (matplotlib-3.10.3-with-freetype-2.13.1.tar.gz) = bb32e57bbd341c652d03361e3785145a9e89f59709eb588882f81cba4061c8aa7250c0d46ed07a588d75a055d72bbc6126c59e8777634385a458287f6ef8812f