diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index b7c27d275df4..81a2ebfe81d4 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -2193,7 +2193,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)