Skip to content

Commit 1ea9f01

Browse files
committed
Fixed int conversion error when enabling log scale
1 parent 26e08fe commit 1ea9f01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

qwt/scale_engine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ def autoScale(self, maxNumSteps, x1, x2, stepSize):
652652
logBase = self.base()
653653
interval = QwtInterval(x1/np.power(logBase, self.lowerMargin()),
654654
x2*np.power(logBase, self.upperMargin()))
655+
interval = interval.limited(LOG_MIN, LOG_MAX)
655656
if interval.maxValue()/interval.minValue() < logBase:
656657
linearScaler = QwtLinearScaleEngine()
657658
linearScaler.setAttributes(self.attributes())
@@ -887,4 +888,4 @@ def align(self, interval, stepSize):
887888

888889
return qwtPowInterval(self.base(), QwtInterval(x1, x2))
889890

890-
891+

0 commit comments

Comments
 (0)