From 2ace676c7f8d6cf0e8de982d534aab6b65e65519 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 14 Jun 2023 20:36:49 -0400 Subject: [PATCH] Backport PR #26126: Revert "Merge pull request #24555 from parthpankajtiwary/symlog-warn" --- lib/matplotlib/scale.py | 5 ----- lib/matplotlib/tests/test_scale.py | 14 -------------- 2 files changed, 19 deletions(-) diff --git a/lib/matplotlib/scale.py b/lib/matplotlib/scale.py index 01e09f11b444..1848589be97c 100644 --- a/lib/matplotlib/scale.py +++ b/lib/matplotlib/scale.py @@ -389,11 +389,6 @@ def __init__(self, base, linthresh, linscale): def transform_non_affine(self, a): abs_a = np.abs(a) - if (abs_a < self.linthresh).all(): - _api.warn_external( - "All values for SymLogScale are below linthresh, making " - "it effectively linear. You likely should lower the value " - "of linthresh. ") with np.errstate(divide="ignore", invalid="ignore"): out = np.sign(a) * self.linthresh * ( np.power(self.base, diff --git a/lib/matplotlib/tests/test_scale.py b/lib/matplotlib/tests/test_scale.py index 3b70d1e9d31d..7f1130560581 100644 --- a/lib/matplotlib/tests/test_scale.py +++ b/lib/matplotlib/tests/test_scale.py @@ -55,20 +55,6 @@ def test_symlog_mask_nan(): assert type(out) == type(x) -def test_symlog_linthresh(): - np.random.seed(19680801) - x = np.random.random(100) - y = np.random.random(100) - - fig, ax = plt.subplots() - plt.plot(x, y, 'o') - ax.set_xscale('symlog') - ax.set_yscale('symlog') - - with pytest.warns(UserWarning, match="All values .* of linthresh"): - fig.canvas.draw() - - @image_comparison(['logit_scales.png'], remove_text=True) def test_logit_scales(): fig, ax = plt.subplots()