From a9ca4b70f470c243a554c27f02fa9c48da59df7b Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Mon, 23 Nov 2015 08:54:21 -0500 Subject: [PATCH] Fix #5524: Use large, but finite, values for contour extensions --- lib/matplotlib/contour.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py index cfb19bf95001..75659a3d7323 100644 --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -1232,9 +1232,9 @@ def _process_levels(self): # ...except that extended layers must be outside the # normed range: if self.extend in ('both', 'min'): - self.layers[0] = -np.inf + self.layers[0] = -1e150 if self.extend in ('both', 'max'): - self.layers[-1] = np.inf + self.layers[-1] = 1e150 def _process_colors(self): """