# xarray.Dataset.plot.streamplot

#### Dataset.plot.streamplot(\*args, x=None, y=None, u=None, v=None, hue=None, hue_style=None, row=None, col=None, col_wrap=None, ax=None, figsize=None, size=None, aspect=None, sharex=True, sharey=True, add_guide=None, subplot_kws=None, cbar_kwargs=None, cbar_ax=None, cmap=None, vmin=None, vmax=None, norm=None, infer_intervals=None, center=None, robust=None, colors=None, extend=None, levels=None, \*\*kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/plot/dataset_plot.py#L160-L316)

Plot streamlines of Dataset variables.

Wraps [`matplotlib.pyplot.streamplot()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.streamplot.html#matplotlib.pyplot.streamplot).

* **Parameters:**
  * **ds** ([`Dataset`](xarray.Dataset.html.md#xarray.Dataset))
  * **x** (`Hashable` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Variable name for x-axis.
  * **y** (`Hashable` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Variable name for y-axis.
  * **u** (`Hashable` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Variable name for the *u* velocity (in *x* direction).
    quiver/streamplot plots only.
  * **v** (`Hashable` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Variable name for the *v* velocity (in *y* direction).
    quiver/streamplot plots only.
  * **hue** (`Hashable` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Variable by which to color scatter points or arrows.
  * **hue_style** (`{'continuous', 'discrete'}` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – How to use the `hue` variable:
    - `'continuous'` – continuous color scale
      : (default for numeric `hue` variables)
    - `'discrete'` – a color for each unique value, using the default color cycle
      : (default for non-numeric `hue` variables)
  * **row** (`Hashable` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – If passed, make row faceted plots on this dimension name.
  * **col** (`Hashable` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – If passed, make column faceted plots on this dimension name.
  * **col_wrap** ([`int`](https://docs.python.org/3/builtins/functions.html#int), [`None`](https://docs.python.org/3/builtins/constants.html#None) or `"auto"`, *optional*) – “Wrap” the grid for the column variable after this number of columns,
    adding rows if `col_wrap` is less than the number of facets.
    If “auto” align the grid to the figsize or keep it as square as possible.
  * **ax** ([`matplotlib axes object`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.html#matplotlib.axes.Axes) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – If `None`, use the current axes. Not applicable when using facets.
  * **figsize** (`Iterable[float]` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – A tuple (width, height) of the figure in inches.
    Mutually exclusive with `size` and `ax`.
  * **size** ([scalar](../user-guide/terminology.html.md#term-scalar), *optional*) – If provided, create a new figure for the plot with the given size.
    Height (in inches) of each plot. See also: `aspect`.
  * **aspect** (`"auto"`, `"equal"`, [scalar](../user-guide/terminology.html.md#term-scalar) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Aspect ratio of plot, so that `aspect * size` gives the width in
    inches. Only used if a `size` is provided.
  * **sharex** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – If True all subplots share the same x-axis.
  * **sharey** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – If True all subplots share the same y-axis.
  * **add_guide** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Add a guide that depends on `hue_style`:
    - `'continuous'` – build a colorbar
    - `'discrete'` – build a legend
  * **subplot_kws** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Dictionary of keyword arguments for Matplotlib subplots
    (see [`matplotlib.figure.Figure.add_subplot()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.figure.Figure.add_subplot.html#matplotlib.figure.Figure.add_subplot)).
    Only applies to FacetGrid plotting.
  * **cbar_kwargs** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict), *optional*) – Dictionary of keyword arguments to pass to the colorbar
    (see [`matplotlib.figure.Figure.colorbar()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.figure.Figure.colorbar.html#matplotlib.figure.Figure.colorbar)).
  * **cbar_ax** ([`matplotlib axes object`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.html#matplotlib.axes.Axes), *optional*) – Axes in which to draw the colorbar.
  * **cmap** ([matplotlib colormap name](https://matplotlib.org/stable/gallery/color/colormap_reference.html) or [`colormap`](https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.Colormap.html#matplotlib.colors.Colormap), *optional*) – The mapping from data values to color space. Either a
    Matplotlib colormap name or object. If not provided, this will
    be either `'viridis'` (if the function infers a sequential
    dataset) or `'RdBu_r'` (if the function infers a diverging
    dataset).
    See [Choosing Colormaps in Matplotlib](https://matplotlib.org/stable/users/explain/colors/colormaps.html)
    for more information.

    If *seaborn* is installed, `cmap` may also be a
    [seaborn color palette](https://seaborn.pydata.org/tutorial/color_palettes.html).
    Note: if `cmap` is a seaborn color palette,
    `levels` must also be specified.
  * **vmin** ([`float`](https://docs.python.org/3/builtins/functions.html#float) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Lower value to anchor the colormap, otherwise it is inferred from the
    data and other keyword arguments. When a diverging dataset is inferred,
    setting vmin or vmax will fix the other by symmetry around
    `center`. Setting both values prevents use of a diverging colormap.
    If discrete levels are provided as an explicit list, both of these
    values are ignored.
  * **vmax** ([`float`](https://docs.python.org/3/builtins/functions.html#float) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Upper value to anchor the colormap, otherwise it is inferred from the
    data and other keyword arguments. When a diverging dataset is inferred,
    setting vmin or vmax will fix the other by symmetry around
    `center`. Setting both values prevents use of a diverging colormap.
    If discrete levels are provided as an explicit list, both of these
    values are ignored.
  * **norm** ([`matplotlib.colors.Normalize`](https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.Normalize.html#matplotlib.colors.Normalize), *optional*) – If `norm` has `vmin` or `vmax` specified, the corresponding
    kwarg must be `None`.
  * **infer_intervals** (`bool | None`) – If True the intervals are inferred.
  * **center** ([`float`](https://docs.python.org/3/builtins/functions.html#float), *optional*) – The value at which to center the colormap. Passing this value implies
    use of a diverging colormap. Setting it to `False` prevents use of a
    diverging colormap.
  * **robust** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *optional*) – If `True` and `vmin` or `vmax` are absent, the colormap range is
    computed with 2nd and 98th percentiles instead of the extreme values.
  * **colors** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str) or [array-like](https://numpy.org/doc/stable/glossary.html#term-array_like) of [`color-like`](https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.is_color_like.html#matplotlib.colors.is_color_like), *optional*) – A single color or a list of colors. The `levels` argument
    is required.
  * **extend** (`{'neither', 'both', 'min', 'max'}`, *optional*) – How to draw arrows extending the colorbar beyond its limits. If not
    provided, `extend` is inferred from `vmin`, `vmax` and the data limits.
  * **levels** ([`int`](https://docs.python.org/3/builtins/functions.html#int) or [array-like](https://numpy.org/doc/stable/glossary.html#term-array_like), *optional*) – Split the colormap (`cmap`) into discrete color intervals. If an integer
    is provided, “nice” levels are chosen based on the data range: this can
    imply that the final number of levels is not exactly the expected one.
    Setting `vmin` and/or `vmax` with `levels=N` is equivalent to
    setting `levels=np.linspace(vmin, vmax, N)`.
  * **\*\*kwargs** (**optional**) – Additional keyword arguments to wrapped Matplotlib function.
