Skip to content

Commit 26e08fe

Browse files
committed
transform.py: avoid overflow errors with log scale
1 parent 6684fbc commit 26e08fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qwt/transform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def bounded(self, value):
166166
Modify value to be a valid value for the transformation.
167167
168168
:param float value: Value to be bounded
169-
:return: Value unmodified
169+
:return: Value modified
170170
"""
171171
return np.clip(value, self.LogMin, self.LogMax)
172172

@@ -181,7 +181,7 @@ def transform(self, value):
181181
182182
:py:meth:`invTransform()`
183183
"""
184-
return np.log(value)
184+
return np.log(self.bounded(value))
185185

186186
def invTransform(self, value):
187187
"""

0 commit comments

Comments
 (0)