From 3eef8473b40daad625104c128ed269585608ff70 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Wed, 14 Nov 2018 21:42:22 +0100 Subject: [PATCH] Fix TypeError when calculating tick_values --- lib/matplotlib/ticker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)