Skip to content

Commit 2ace676

Browse files
committed
Backport PR #26126: Revert "Merge pull request #24555 from parthpankajtiwary/symlog-warn"
1 parent 8d42212 commit 2ace676

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

lib/matplotlib/scale.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,6 @@ def __init__(self, base, linthresh, linscale):
389389

390390
def transform_non_affine(self, a):
391391
abs_a = np.abs(a)
392-
if (abs_a < self.linthresh).all():
393-
_api.warn_external(
394-
"All values for SymLogScale are below linthresh, making "
395-
"it effectively linear. You likely should lower the value "
396-
"of linthresh. ")
397392
with np.errstate(divide="ignore", invalid="ignore"):
398393
out = np.sign(a) * self.linthresh * (
399394
np.power(self.base,

lib/matplotlib/tests/test_scale.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,6 @@ def test_symlog_mask_nan():
5555
assert type(out) == type(x)
5656

5757

58-
def test_symlog_linthresh():
59-
np.random.seed(19680801)
60-
x = np.random.random(100)
61-
y = np.random.random(100)
62-
63-
fig, ax = plt.subplots()
64-
plt.plot(x, y, 'o')
65-
ax.set_xscale('symlog')
66-
ax.set_yscale('symlog')
67-
68-
with pytest.warns(UserWarning, match="All values .* of linthresh"):
69-
fig.canvas.draw()
70-
71-
7258
@image_comparison(['logit_scales.png'], remove_text=True)
7359
def test_logit_scales():
7460
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)