diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index 93dc6c885917..bc4a7b6b95d7 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -2155,7 +2155,7 @@ def tick_values(self, vmin, vmax): stride += 1 # Does subs include anything other than 1? - have_subs = len(subs) > 1 or (len(subs == 1) and subs[0] != 1.0) + have_subs = len(subs) > 1 or (len(subs) == 1 and subs[0] != 1.0) decades = np.arange(math.floor(vmin) - stride, math.ceil(vmax) + 2 * stride, stride)