Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Dep contourset vminmax #5552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 24, 2015
Merged
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
Next Next commit
DEP: remove vmin/vmax from ContourSet
These are unused public attributes which were flagged to be removed
in 2012 in 9cba6fb by @efiring.
  • Loading branch information
tacaswell committed Nov 24, 2015
commit 359de9f4945f26b8e5b3afd3571b35fa9d3bdbbd
22 changes: 18 additions & 4 deletions 22 lib/matplotlib/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import matplotlib.patches as mpatches
import matplotlib.texmanager as texmanager
import matplotlib.transforms as mtrans
from matplotlib.cbook import mplDeprecation

# Import needed for adding manual selection capability to clabel
from matplotlib.blocking_input import BlockingContourLabeler
Expand Down Expand Up @@ -1198,6 +1199,20 @@ def _contour_level_args(self, z, args):
else:
raise ValueError("Contour levels must be increasing")

@property
def vmin(self):
warnings.warn("vmin is deprecated and will be removed in 2.2 "
"and not replaced.",
mplDeprecation)
return getattr(self, '_vmin', None)

@property
def vmax(self):
warnings.warn("vmax is deprecated and will be removed in 2.2 "
"and not replaced.",
mplDeprecation)
return getattr(self, '_vmax', None)

def _process_levels(self):
"""
Assign values to :attr:`layers` based on :attr:`levels`,
Expand All @@ -1207,10 +1222,9 @@ def _process_levels(self):
a line is a thin layer. No extended levels are needed
with line contours.
"""
# The following attributes are no longer needed, and
# should be deprecated and removed to reduce confusion.
self.vmin = np.amin(self.levels)
self.vmax = np.amax(self.levels)
# following are deprecated and will be removed in 2.2
self._vmin = np.amin(self.levels)
self._vmax = np.amax(self.levels)

# Make a private _levels to include extended regions; we
# want to leave the original levels attribute unchanged.
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.