From 85896728ab6276da7b61f023acd7756cc73cf15d Mon Sep 17 00:00:00 2001 From: David Stansby Date: Fri, 9 Jun 2017 19:26:11 +0100 Subject: [PATCH] Fix contour colour level determination --- lib/matplotlib/contour.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py index 82d9fb023312..5d3fc1126c0d 100644 --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -1254,11 +1254,11 @@ def _process_colors(self): i0, i1 = 0, len(self.levels) if self.filled: i1 -= 1 - # Out of range indices for over and under: - if self.extend in ('both', 'min'): - i0 = -1 - if self.extend in ('both', 'max'): - i1 += 1 + # Out of range indices for over and under: + if self.extend in ('both', 'min'): + i0 -= 1 + if self.extend in ('both', 'max'): + i1 += 1 self.cvalues = list(range(i0, i1)) self.set_norm(colors.NoNorm()) else: