8000 Fix contour colour level determination · matplotlib/matplotlib@a62d3e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit a62d3e3

Browse files
dstansbyjklymak
authored andcommitted
Fix contour colour level determination
1 parent 234089d commit a62d3e3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/matplotlib/contour.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,11 +1254,11 @@ def _process_colors(self):
12541254
i0, i1 = 0, len(self.levels)
12551255
if self.filled:
12561256
i1 -= 1
1257-
# Out of range indices for over and under:
1258-
if self.extend in ('both', 'min'):
1259-
i0 = -1
1260-
if self.extend in ('both', 'max'):
1261-
i1 += 1
1257+
# Out of range indices for over and under:
1258+
if self.extend in ('both', 'min'):
1259+
i0 -= 1
1260+
if self.extend in ('both', 'max'):
1261+
i1 += 1
12621262
self.cvalues = list(range(i0, i1))
12631263
self.set_norm(colors.NoNorm())
12641264
else:

0 commit comments

Comments
 (0)
0