@@ -6074,7 +6074,7 @@ def fill(self, *args, data=None, **kwargs):
60746074
60756075 def _fill_between_x_or_y (
60766076 self , ind_dir , ind , dep1 , dep2 = 0 , * ,
6077- where = None , interpolate = False , step = None , ** kwargs ):
6077+ where = None , interpolate = False , drawstyle = None , step = None , ** kwargs ):
60786078 # Common implementation between fill_between (*ind_dir*="x") and
60796079 # fill_betweenx (*ind_dir*="y"). *ind* is the independent variable,
60806080 # *dep* the dependent variable. The docstring below is interpolated
@@ -6126,18 +6126,26 @@ def _fill_between_x_or_y(
61266126 Setting *interpolate* to *True* will calculate the actual
61276127 intersection point and extend the filled region up to this point.
61286128
6129- step : {{'pre', 'post', 'mid'}}, optional
6130- Define *step * if the filling should be a step function,
6131- i.e. constant in between *{ind} *. The value determines where the
6129+ drawstyle : {{'steps', 'steps- pre', 'steps- post', 'steps- mid'}}, optional
6130+ Define *drawstyle * if the filling should be a step function,
6131+ i.e. constant in between *t *. The value determines where the
61326132 step will occur:
61336133
6134- - 'pre': The {dep} value is continued constantly to the left from
6135- every *{ind}* position, i.e. the interval ``({ind}[i-1], {ind}[i]]``
6136- has the value ``{dep}[i]``.
6137- - 'post': The y value is continued constantly to the right from
6138- every *{ind}* position, i.e. the interval ``[{ind}[i], {ind}[i+1])``
6139- has the value ``{dep}[i]``.
6140- - 'mid': Steps occur half-way between the *{ind}* positions.
6134+ - 'steps-pre' or 'steps': The f value is continued constantly to the left
6135+ from every *t* position, i.e. the interval ``(t[i-1], t[i]]`` has the
6136+ value ``f[i]``.
6137+ - 'steps-post': The y value is continued constantly to the right from
6138+ every *x* position, i.e. the interval ``[t[i], t[i+1])`` has the
6139+ value ``f[i]``.
6140+ - 'steps-mid': Steps occur half-way between the *t* positions.
6141+
6142+ step : {{'pre', 'post', 'mid'}}, optional
6143+
6144+ .. admonition:: Discouraged
6145+
6146+ This parameter is discouraged in favor of *drawstyle*. The effect is the
6147+ same as the corresponding *drawstyle* value; e.g. ``step='pre'`` is the
6148+ same as ``drawstyle='steps-pre'``.
61416149
61426150 Returns
61436151 -------
@@ -6172,7 +6180,8 @@ def _fill_between_x_or_y(
61726180
61736181 collection = mcoll .FillBetweenPolyCollection (
61746182 ind_dir , ind , dep1 , dep2 ,
6175- where = where , interpolate = interpolate , step = step , ** kwargs )
6183+ where = where , interpolate = interpolate ,
6184+ drawstyle = drawstyle , step = step , ** kwargs )
61766185
61776186 self .add_collection (collection )
61786187 return collection
@@ -6183,10 +6192,11 @@ def _fill_between_process_units(self, ind_dir, dep_dir, ind, dep1, dep2, **kwarg
61836192 [(ind_dir , ind ), (dep_dir , dep1 ), (dep_dir , dep2 )], kwargs ))
61846193
61856194 def fill_between (self , x , y1 , y2 = 0 , where = None , interpolate = False ,
6186- step = None , ** kwargs ):
6195+ drawstyle = None , step = None , ** kwargs ):
61876196 return self ._fill_between_x_or_y (
61886197 "x" , x , y1 , y2 ,
6189- where = where , interpolate = interpolate , step = step , ** kwargs )
6198+ where = where , interpolate = interpolate , drawstyle = drawstyle , step = step ,
6199+ ** kwargs )
61906200
61916201 if _fill_between_x_or_y .__doc__ :
61926202 fill_between .__doc__ = _fill_between_x_or_y .__doc__ .format (
@@ -6197,10 +6207,11 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
61976207 replace_names = ["x" , "y1" , "y2" , "where" ])
61986208
61996209 def fill_betweenx (self , y , x1 , x2 = 0 , where = None ,
6200- step = None , interpolate = False , ** kwargs ):
6210+ drawstyle = None , step = None , interpolate = False , ** kwargs ):
62016211 return self ._fill_between_x_or_y (
62026212 "y" , y , x1 , x2 ,
6203- where = where , interpolate = interpolate , step = step , ** kwargs )
6213+ where = where , interpolate = interpolate , drawstyle = drawstyle , step = step ,
6214+ ** kwargs )
62046215
62056216 if _fill_between_x_or_y .__doc__ :
62066217 fill_betweenx .__doc__ = _fill_between_x_or_y .__doc__ .format (
0 commit comments