Skip to content

Commit 98e719b

Browse files
authored
Fix autoScale in scale_engine.py
The [original code in `qwt_scale_engine.cpp`](https://sourceforge.net/p/qwt/code/HEAD/tree/trunk/qwt/src/qwt_scale_engine.cpp#l826) was setting the `stepSize` to zero. Not sure why this was changed, perhaps by accident?
1 parent 35c9fc2 commit 98e719b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

qwt/scale_engine.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -674,10 +674,7 @@ def autoScale(self, maxNumSteps, x1, x2, stepSize):
674674
linearInterval = linearInterval.limited(LOG_MIN, LOG_MAX)
675675

676676
if linearInterval.maxValue() / linearInterval.minValue() < logBase:
677-
if stepSize < 0.0:
678-
stepSize = -math.log(abs(stepSize), logBase)
679-
else:
680-
stepSize = math.log(stepSize, logBase)
677+
stepSize = 0.0
681678
return x1, x2, stepSize
682679

683680
logRef = 1.0

0 commit comments

Comments
 (0)