@@ -1114,7 +1114,7 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
11141114positional_parameter_names = _plot_args_replacer ,
11151115label_namer = None )
11161116@docstring .dedent_interpd
1117- def plot (self ,* args ,** kwargs ):
1117+ def plot (self ,* args ,scalex = True , scaley = True , ** kwargs ):
11181118"""
11191119 Plot y versus x as lines and/or markers.
11201120
@@ -1341,8 +1341,6 @@ def plot(self, *args, **kwargs):
13411341 'k^:' # black triangle_up markers connected by a dotted line
13421342
13431343 """
1344- scalex = kwargs .pop ('scalex' ,True )
1345- scaley = kwargs .pop ('scaley' ,True )
13461344lines = []
13471345
13481346kwargs = cbook .normalize_kwargs (kwargs ,mlines .Line2D ._alias_map )
@@ -1734,7 +1732,7 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
17341732#### Specialized plotting
17351733
17361734@_preprocess_data (replace_names = ["x" ,"y" ],label_namer = "y" )
1737- def step (self ,x ,y ,* args ,** kwargs ):
1735+ def step (self ,x ,y ,* args ,where = 'pre' , linestyle = '' , ** kwargs ):
17381736"""
17391737 Make a step plot.
17401738
@@ -1795,12 +1793,10 @@ def step(self, x, y, *args, **kwargs):
17951793 -----
17961794 .. [notes section required to get data note injection right]
17971795 """
1798- where = kwargs .pop ('where' ,'pre' )
17991796if where not in ('pre' ,'post' ,'mid' ):
18001797raise ValueError ("'where' argument to step must be "
18011798"'pre', 'post' or 'mid'" )
1802- usr_linestyle = kwargs .pop ('linestyle' ,'' )
1803- kwargs ['linestyle' ]= 'steps-' + where + usr_linestyle
1799+ kwargs ['linestyle' ]= 'steps-' + where + linestyle
18041800
18051801return self .plot (x ,y ,* args ,** kwargs )
18061802
@@ -2268,7 +2264,8 @@ def broken_barh(self, xranges, yrange, **kwargs):
22682264return col
22692265
22702266@_preprocess_data (replace_all_args = True ,label_namer = None )
2271- def stem (self ,* args ,** kwargs ):
2267+ def stem (self ,* args ,linefmt = None ,markerfmt = None ,basefmt = None ,
2268+ bottom = 0 ,label = None ):
22722269"""
22732270 Create a stem plot.
22742271
@@ -2328,15 +2325,6 @@ def stem(self, *args, **kwargs):
23282325 The label to use for the stems in legends.
23292326
23302327
2331- Other Parameters
2332- ----------------
2333- **kwargs
2334- No other parameters are supported. They are currently ignored
2335- silently for backward compatibility. This behavior is deprecated.
2336- Future versions will not accept any other parameters and will
2337- raise a TypeError instead.
2338-
2339-
23402328 Returns
23412329 -------
23422330 :class:`~matplotlib.container.StemContainer`
@@ -2353,41 +2341,18 @@ def stem(self, *args, **kwargs):
23532341 which inspired this method.
23542342
23552343 """
2356-
2357- # kwargs handling
2358- # We would like to have a signature with explicit kewords:
2359- # stem(*args, linefmt=None, markerfmt=None, basefmt=None,
2360- # bottom=0, label=None)
2361- # Unfortunately, this is not supported in Python 2.x. There, *args
2362- # can only exist after keyword arguments.
2363- linefmt = kwargs .pop ('linefmt' ,None )
2364- markerfmt = kwargs .pop ('markerfmt' ,None )
2365- basefmt = kwargs .pop ('basefmt' ,None )
2366- bottom = kwargs .pop ('bottom' ,None )
2367- if bottom is None :
2368- bottom = 0
2369- label = kwargs .pop ('label' ,None )
2370- if kwargs :
2371- warn_deprecated (since = '2.2' ,
2372- message = "stem() got an unexpected keyword "
2373- "argument '%s'. This will raise a "
2374- "TypeError in future versions." % (
2375- next (k for k in kwargs ), )
2376- )
2377-
23782344# Assume there's at least one data array
23792345y = np .asarray (args [0 ])
23802346args = args [1 :]
23812347
23822348# Try a second one
23832349try :
2384- second = np .asarray (args [0 ],dtype = float )
2385- x ,y = y ,second
2386- args = args [1 :]
2350+ x ,y = y ,np .asarray (args [0 ],dtype = float )
23872351except (IndexError ,ValueError ):
23882352# The second array doesn't make sense, or it doesn't exist
2389- second = np .arange (len (y ))
2390- x = second
2353+ x = np .arange (len (y ))
2354+ else :
2355+ args = args [1 :]
23912356
23922357# defaults for formats
23932358if linefmt is None :
@@ -5242,7 +5207,8 @@ def _pcolorargs(funcname, *args, allmatch=False):
52425207
52435208@_preprocess_data (label_namer = None )
52445209@docstring .dedent_interpd
5245- def pcolor (self ,* args ,** kwargs ):
5210+ def pcolor (self ,* args ,alpha = None ,norm = None ,cmap = None ,vmin = None ,
5211+ vmax = None ,** kwargs ):
52465212"""
52475213 Create a pseudocolor plot of a 2-D array.
52485214
@@ -5381,12 +5347,6 @@ def pcolor(self, *args, **kwargs):
53815347 not specified, or if ``X`` and ``Y`` have one more row and column than
53825348 ``C``.
53835349 """
5384- alpha = kwargs .pop ('alpha' ,None )
5385- norm = kwargs .pop ('norm' ,None )
5386- cmap = kwargs .pop ('cmap' ,None )
5387- vmin = kwargs .pop ('vmin' ,None )
5388- vmax = kwargs .pop ('vmax' ,None )
5389-
53905350X ,Y ,C = self ._pcolorargs ('pcolor' ,* args ,allmatch = False )
53915351Ny ,Nx = X .shape
53925352
@@ -5488,7 +5448,8 @@ def pcolor(self, *args, **kwargs):
54885448
54895449@_preprocess_data (label_namer = None )
54905450@docstring .dedent_interpd
5491- def pcolormesh (self ,* args ,** kwargs ):
5451+ def pcolormesh (self ,* args ,alpha = None ,norm = None ,cmap = None ,vmin = None ,
5452+ vmax = None ,shading = 'flat' ,antialiased = False ,** kwargs ):
54925453"""
54935454 Plot a quadrilateral mesh.
54945455
@@ -5564,13 +5525,7 @@ def pcolormesh(self, *args, **kwargs):
55645525
55655526 %(QuadMesh)s
55665527 """
5567- alpha = kwargs .pop ('alpha' ,None )
5568- norm = kwargs .pop ('norm' ,None )
5569- cmap = kwargs .pop ('cmap' ,None )
5570- vmin = kwargs .pop ('vmin' ,None )
5571- vmax = kwargs .pop ('vmax' ,None )
5572- shading = kwargs .pop ('shading' ,'flat' ).lower ()
5573- antialiased = kwargs .pop ('antialiased' ,False )
5528+ shading = shading .lower ()
55745529kwargs .setdefault ('edgecolors' ,'None' )
55755530
55765531allmatch = (shading == 'gouraud' )
@@ -5625,7 +5580,8 @@ def pcolormesh(self, *args, **kwargs):
56255580
56265581@_preprocess_data (label_namer = None )
56275582@docstring .dedent_interpd
5628- def pcolorfast (self ,* args ,** kwargs ):
5583+ def pcolorfast (self ,* args ,alpha = None ,norm = None ,cmap = None ,vmin = None ,
5584+ vmax = None ,** kwargs ):
56295585"""
56305586 pseudocolor plot of a 2-D array
56315587
@@ -5707,11 +5663,6 @@ def pcolorfast(self, *args, **kwargs):
57075663 collection in the general quadrilateral case.
57085664
57095665 """
5710- alpha = kwargs .pop ('alpha' ,None )
5711- norm = kwargs .pop ('norm' ,None )
5712- cmap = kwargs .pop ('cmap' ,None )
5713- vmin = kwargs .pop ('vmin' ,None )
5714- vmax = kwargs .pop ('vmax' ,None )
57155666if norm is not None and not isinstance (norm ,mcolors .Normalize ):
57165667raise ValueError (
57175668"'norm' must be an instance of 'mcolors.Normalize'" )