10
10
import matplotlib
11
11
rcParams = matplotlib .rcParams
12
12
13
- from matplotlib import MatplotlibDeprecationWarning as MDeprecation
14
-
15
13
import matplotlib .artist as martist
16
14
from matplotlib .artist import allow_rasterization
17
15
import matplotlib .axis as maxis
@@ -1053,8 +1051,8 @@ def set_aspect(self, aspect, adjustable=None, anchor=None):
1053
1051
the option 'normal' for aspect is deprecated. Use 'auto' instead.
1054
1052
"""
1055
1053
if aspect == 'normal' :
1056
- raise MDeprecation ("Use 'auto' instead of 'normal' for "
1057
- "aspect. Will be removed in 1.4.x" )
1054
+ warnings . warn ("Use 'auto' instead of 'normal' for aspect. Will "
1055
+ " be removed in 1.4.x", mplDeprecation )
1058
1056
self ._aspect = 'auto'
1059
1057
1060
1058
elif aspect in ('equal' , 'auto' ):
@@ -7264,8 +7262,8 @@ def pcolor(self, *args, **kwargs):
7264
7262
vmin = kwargs .pop ('vmin' , None )
7265
7263
vmax = kwargs .pop ('vmax' , None )
7266
7264
if 'shading' in kwargs :
7267
- raise DeprecationWarning ("Use edgecolors instead of shading. "
7268
- "Will be removed in 1.4" )
7265
+ warnings . warn ("Use edgecolors instead of shading. "
7266
+ "Will be removed in 1.4" , mplDeprecation )
7269
7267
shading = kwargs .pop ('shading' , 'flat' )
7270
7268
7271
7269
X , Y , C = self ._pcolorargs ('pcolor' , * args )
@@ -7310,7 +7308,6 @@ def pcolor(self, *args, **kwargs):
7310
7308
kwargs ['linewidths' ] = kwargs .pop ('linewidth' )
7311
7309
kwargs .setdefault ('linewidths' , linewidths )
7312
7310
7313
-
7314
7311
if shading == 'faceted' :
7315
7312
edgecolors = 'k' ,
7316
7313
else :
@@ -7320,7 +7317,6 @@ def pcolor(self, *args, **kwargs):
7320
7317
kwargs ['edgecolors' ] = kwargs .pop ('edgecolor' )
7321
7318
ec = kwargs .setdefault ('edgecolors' , edgecolors )
7322
7319
7323
-
7324
7320
# aa setting will default via collections to patch.antialiased
7325
7321
# unless the boundary is not stroked, in which case the
7326
7322
# default will be False; with unstroked boundaries, aa
0 commit comments