Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f4ce6ba

Browse files
Loosen tolerance on flaky image comparison tests
1 parent 02d4fdf commit f4ce6ba

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ def drag_pan(self, button, key, x, y):
18721872
R = -R / self._box_aspect * self._dist
18731873
duvw_projected = R.T @ np.array([du, dv, dw])
18741874

1875-
# Calculate pan distance in transformed coordinates for non-linear scale handling
1875+
# Calculate pan distance in transformed coordinates for non-linear scales
18761876
minx, maxx, miny, maxy, minz, maxz = self._get_scaled_limits()
18771877
dx = (maxx - minx) * duvw_projected[0]
18781878
dy = (maxy - miny) * duvw_projected[1]
@@ -2026,7 +2026,7 @@ def _get_w_centers_ranges(self):
20262026
For non-linear scales (log, symlog, etc.), centers and ranges are
20272027
computed in transformed coordinates to ensure uniform zoom/pan behavior.
20282028
"""
2029-
# Get limits in transformed coordinates for proper zoom/pan with non-linear scales
2029+
# Get limits in transformed coordinates for non-linear scale zoom/pan
20302030
minx, maxx, miny, maxy, minz, maxz = self._get_scaled_limits()
20312031
cx = (maxx + minx)/2
20322032
cy = (maxy + miny)/2

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,7 +2877,7 @@ def _make_triangulation_data():
28772877
return x, y, z
28782878

28792879

2880-
@mpl3d_image_comparison(['scale3d_lines_log.png'], style='mpl20')
2880+
@mpl3d_image_comparison(['scale3d_lines_log.png'], style='mpl20', tol=0.03)
28812881
def test_scale3d_lines_log():
28822882
"""Test Line3D and Line3DCollection with log scale (plot, wireframe)."""
28832883
fig = plt.figure()
@@ -2937,7 +2937,7 @@ def test_scale3d_bar3d_log():
29372937
ax.set(xscale='log', yscale='log', zscale='log')
29382938

29392939

2940-
@mpl3d_image_comparison(['scale3d_contour_log.png'], style='mpl20')
2940+
@mpl3d_image_comparison(['scale3d_contour_log.png'], style='mpl20', tol=0.03)
29412941
def test_scale3d_contour_log():
29422942
"""Test contour and contourf with log scale."""
29432943
fig = plt.figure()
@@ -2954,7 +2954,7 @@ def test_scale3d_contour_log():
29542954
ax2.set(xscale='log', yscale='log', zscale='log')
29552955

29562956

2957-
@mpl3d_image_comparison(['scale3d_stem_quiver_log.png'], style='mpl20')
2957+
@mpl3d_image_comparison(['scale3d_stem_quiver_log.png'], style='mpl20', tol=0.03)
29582958
def test_scale3d_stem_quiver_log():
29592959
"""Test stem and quiver with log scale."""
29602960
fig = plt.figure()

0 commit comments

Comments
 (0)