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

Skip to content

Commit ca892ea

Browse files
committed
Merge pull request #5546 from mdboom/color-extensions2
Fix #5524: Use large, but finite, values for contour extensions
2 parents b698502 + a9ca4b7 commit ca892ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/contour.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,9 +1246,9 @@ def _process_levels(self):
12461246
# ...except that extended layers must be outside the
12471247
# normed range:
12481248
if self.extend in ('both', 'min'):
1249-
self.layers[0] = -np.inf
1249+
self.layers[0] = -1e150
12501250
if self.extend in ('both', 'max'):
1251-
self.layers[-1] = np.inf
1251+
self.layers[-1] = 1e150
12521252

12531253
def _process_colors(self):
12541254
"""

0 commit comments

Comments
 (0)