Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions qwt/scale_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,10 +674,9 @@ def autoScale(self, maxNumSteps, x1, x2, stepSize):
linearInterval = linearInterval.limited(LOG_MIN, LOG_MAX)

if linearInterval.maxValue() / linearInterval.minValue() < logBase:
if stepSize < 0.0:
stepSize = -math.log(abs(stepSize), logBase)
else:
stepSize = math.log(stepSize, logBase)
# The min / max interval is too short to be represented as a log scale.
# Set the step to 0, so that a new step is calculated and a linear scale is used.
stepSize = 0.0
return x1, x2, stepSize

logRef = 1.0
Expand Down
Loading