# xarray.plot.step

### xarray.plot.step(darray, \*args, where='pre', drawstyle=None, ds=None, row=None, col=None, \*\*kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/plot/dataarray_plot.py#L624-L683)

Step plot of DataArray values.

Similar to [`matplotlib.pyplot.step()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.step.html#matplotlib.pyplot.step).

* **Parameters:**
  * **where** (`{'pre', 'post', 'mid'}`, *default*: `'pre'`) – Define where the steps should be placed:
    - `'pre'`: The y value is continued constantly to the left from
      every *x* position, i.e. the interval `(x[i-1], x[i]]` has the
      value `y[i]`.
    - `'post'`: The y value is continued constantly to the right from
      every *x* position, i.e. the interval `[x[i], x[i+1])` has the
      value `y[i]`.
    - `'mid'`: Steps occur half-way between the *x* positions.

    Note that this parameter is ignored if one coordinate consists of
    [`pandas.Interval`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Interval.html#pandas.Interval) values, e.g. as a result of
    [`xarray.Dataset.groupby_bins()`](xarray.Dataset.groupby_bins.html.md#xarray.Dataset.groupby_bins). In this case, the actual
    boundaries of the interval are used.
  * **drawstyle, ds** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Additional drawstyle. Only use one of drawstyle and ds.
  * **row** (`Hashable`, *optional*) – If passed, make row faceted plots on this dimension name.
  * **col** (`Hashable`, *optional*) – If passed, make column faceted plots on this dimension name.
  * **\*args, \*\*kwargs** (**optional**) – Additional arguments for [`xarray.plot.line()`](xarray.plot.line.html.md#xarray.plot.line).
* **Returns:**
  **primitive** ([`list`](https://docs.python.org/3/builtins/stdtypes.html#list) of `Line3D` or [`FacetGrid`](xarray.plot.FacetGrid.html.md#xarray.plot.FacetGrid)) – When either col or row is given, returns a FacetGrid, otherwise
  a list of matplotlib Line3D objects.
