8000 Fix bug in SymmetricalLogTransform. · matplotlib/matplotlib@d3ca16c · GitHub
[go: up one dir, main page]

Skip to content

Commit d3ca16c

Browse files
committed
Fix bug in SymmetricalLogTransform.
By failing the copy the input array, SymmetricalLogTransform.transform_non_affine was returning an array with points in the linear range masked. Closes #14265. Replaces #14281.
1 parent 89105f1 commit d3ca16c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/scale.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ def transform_non_affine(self, a):
489489
masked = ma.masked_inside(a,
490490
-self.linthresh,
491491
self.linthresh,
492-
copy=False)
492+
copy=True)
493493
log = sign * self.linthresh * (
494494
self._linscale_adj +
495495
ma.log(np.abs(masked) / self.linthresh) / self._log_base)
@@ -521,7 +521,7 @@ def __init__(self, base, linthresh, linscale):
521521
def transform_non_affine(self, a):
522522
sign = np.sign(a)
523523
masked = ma.masked_inside(a, -self.invlinthresh,
524-
self.invlinthresh, copy=False)
524+
self.invlinthresh, copy=True)
525525
exp = sign * self.linthresh * (
526526
ma.power(self.base, (sign * (masked / self.linthresh))
527527
- self._linscale_adj))

0 commit comments

Comments
 (0)
0