diff --git a/qwt/scale_engine.py b/qwt/scale_engine.py index 7e94ed4..1fcc605 100644 --- a/qwt/scale_engine.py +++ b/qwt/scale_engine.py @@ -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