From 905e56ae2350d3508349e9f610049905563865e2 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Thu, 15 Nov 2018 05:07:01 +0100 Subject: [PATCH] Backport PR #12809: 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 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)