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

Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
switch calls for vmin and vmax through kwargs in _contour_args() to j…
…ust call and not pop out the arguments. Turns out it is not necessary to use extend, this will just happen on its own.
  • Loading branch information
kthyng committed Jun 28, 2013
commit f627dc711df5fc22772ec493796073770da64fdf
7 changes: 3 additions & 4 deletions lib/matplotlib/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import matplotlib.patches as mpatches
import matplotlib.texmanager as texmanager
import matplotlib.transforms as mtrans
import pdb

# Import needed for adding manual selection capability to clabel
from matplotlib.blocking_input import BlockingContourLabeler
Expand Down Expand Up @@ -1197,7 +1196,7 @@ def _process_levels(self):
# want to leave the original levels attribute unchanged.
# (Colorbar needs this even for line contours.)
self._levels = list(self.levels)
pdb.set_trace()

if self.extend in ('both', 'min'):
self._levels.insert(0, min(self.levels[0], self.zmin) - 1)
if self.extend in ('both', 'max'):
Expand Down Expand Up @@ -1501,14 +1500,14 @@ def _contour_args(self, args, kwargs):
vmax = kwargs['vmax']
ind = z > vmax
z[ind] = vmax
self.zmax = kwargs.pop('vmax')
self.zmax = kwargs['vmax']
else:
self.zmax = ma.maximum(z)
if 'vmin' in kwargs:
vmin = kwargs['vmin']
ind = z < vmin
z[ind] = vmin
self.zmin = kwargs.pop('vmin')
self.zmin = kwargs['vmin']
else:
self.zmin = ma.minimum(z)

Expand Down