2727import matplotlib .patches as mpatches
2828import matplotlib .texmanager as texmanager
2929import matplotlib .transforms as mtrans
30+ from matplotlib .cbook import mplDeprecation
3031
3132# Import needed for adding manual selection capability to clabel
3233from matplotlib .blocking_input import BlockingContourLabeler
@@ -1198,6 +1199,20 @@ def _contour_level_args(self, z, args):
11981199 else :
11991200 raise ValueError ("Contour levels must be increasing" )
12001201
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+
12011216 def _process_levels (self ):
12021217 """
12031218 Assign values to :attr:`layers` based on :attr:`levels`,
@@ -1207,10 +1222,9 @@ def _process_levels(self):
12071222 a line is a thin layer. No extended levels are needed
12081223 with line contours.
12091224 """
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 )
12141228
12151229 # Make a private _levels to include extended regions; we
12161230 # want to leave the original levels attribute unchanged.
0 commit comments