27
27
import matplotlib .patches as mpatches
28
28
import matplotlib .texmanager as texmanager
29
29
import matplotlib .transforms as mtrans
30
+ from matplotlib .cbook import mplDeprecation
30
31
31
32
# Import needed for adding manual selection capability to clabel
32
33
from matplotlib .blocking_input import BlockingContourLabeler
@@ -1198,6 +1199,20 @@ def _contour_level_args(self, z, args):
1198
1199
else :
1199
1200
raise ValueError ("Contour levels must be increasing" )
1200
1201
1202
+ @property
1203
+ def vmin (self ):
1204
+ warnings .warn ("vmin is deprecated and will be removed in 2.2 "
1205
+ "and not replaced." ,
1206
+ mplDeprecation )
1207
+ return getattr (self , '_vmin' , None )
1208
+
1209
+ @property
1210
+ def vmax (self ):
1211
+ warnings .warn ("vmax is deprecated and will be removed in 2.2 "
1212
+ "and not replaced." ,
1213
+ mplDeprecation )
1214
+ return getattr (self , '_vmax' , None )
1215
+
1201
1216
def _process_levels (self ):
1202
1217
"""
1203
1218
Assign values to :attr:`layers` based on :attr:`levels`,
@@ -1207,10 +1222,9 @@ def _process_levels(self):
1207
1222
a line is a thin layer. No extended levels are needed
1208
1223
with line contours.
1209
1224
"""
1210
- # The following attributes are no longer needed, and
1211
- # should be deprecated and removed to reduce confusion.
1212
- self .vmin = np .amin (self .levels )
1213
- self .vmax = np .amax (self .levels )
1225
+ # following are deprecated and will be removed in 2.2
1226
+ self ._vmin = np .amin (self .levels )
1227
+ self ._vmax = np .amax (self .levels )
1214
1228
1215
1229
# Make a private _levels to include extended regions; we
1216
1230
# want to leave the original levels attribute unchanged.
0 commit comments