Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8589672

Browse files
committed
Fix contour colour level determination
1 parent 4d26d74 commit 8589672

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)