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

Skip to content

removed deprecated methods from the axes module. #1568

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 4 commits into from
Jan 16, 2013
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
Prev Previous commit
Next Next commit
Replaced DeprecationWarnings with mplDeprecation warnigns
  • Loading branch information
NelleV committed Jan 14, 2013
commit 94d6b422523eec7a4f4616954140cbeab202debd
12 changes: 4 additions & 8 deletions lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import matplotlib
rcParams = matplotlib.rcParams

from matplotlib import MatplotlibDeprecationWarning as MDeprecation

import matplotlib.artist as martist
from matplotlib.artist import allow_rasterization
import matplotlib.axis as maxis
Expand Down Expand Up @@ -1053,8 +1051,8 @@ def set_aspect(self, aspect, adjustable=None, anchor=None):
the option 'normal' for aspect is deprecated. Use 'auto' instead.
"""
if aspect == 'normal':
raise MDeprecation("Use 'auto' instead of 'normal' for "
"aspect. Will be removed in 1.4.x")
warnings.warn("Use 'auto' instead of 'normal' for aspect. Will "
"be removed in 1.4.x", mplDeprecation)
self._aspect = 'auto'

elif aspect in ('equal', 'auto'):
Expand Down Expand Up @@ -7264,8 +7262,8 @@ def pcolor(self, *args, **kwargs):
vmin = kwargs.pop('vmin', None)
vmax = kwargs.pop('vmax', None)
if 'shading' in kwargs:
raise DeprecationWarning("Use edgecolors instead of shading. "
"Will be removed in 1.4")
warnings.warn("Use edgecolors instead of shading. "
"Will be removed in 1.4", mplDeprecation)
shading = kwargs.pop('shading', 'flat')

X, Y, C = self._pcolorargs('pcolor', *args)
Expand Down Expand Up @@ -7310,7 +7308,6 @@ def pcolor(self, *args, **kwargs):
kwargs['linewidths'] = kwargs.pop('linewidth')
kwargs.setdefault('linewidths', linewidths)


if shading == 'faceted':
edgecolors = 'k',
else:
Expand All @@ -7320,7 +7317,6 @@ def pcolor(self, *args, **kwargs):
kwargs['edgecolors'] = kwargs.pop('edgecolor')
ec = kwargs.setdefault('edgecolors', edgecolors)


# aa setting will default via collections to patch.antialiased
# unless the boundary is not stroked, in which case the
# default will be False; with unstroked boundaries, aa
Expand Down