# xarray.DataArray.plot

#### DataArray.plot(, row=None, col=None, col_wrap=None, ax=None, hue=None, subplot_kws=None, \*\*kwargs)[[source]](https://github.com/pydata/xarray/blob/v2026.09.0/xarray/plot/accessor.py#L30-L1029)

Default plot of DataArray using [`matplotlib.pyplot`](https://matplotlib.org/stable/api/pyplot_summary.html#module-matplotlib.pyplot).

Calls xarray plotting function based on the dimensions of
the squeezed DataArray.

| Dimensions    | Plotting function                                                                                |
|---------------|--------------------------------------------------------------------------------------------------|
| 1             | [`xarray.plot.line()`](xarray.plot.line.html.md#xarray.plot.line)             |
| 2             | [`xarray.plot.pcolormesh()`](xarray.plot.pcolormesh.html.md#xarray.plot.pcolormesh) |
| Anything else | [`xarray.plot.hist()`](xarray.plot.hist.html.md#xarray.plot.hist)             |
* **Parameters:**
  * **darray** ([`DataArray`](xarray.DataArray.html.md#xarray.DataArray))
  * **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), *optional*) – Axes on which to plot. By default, use the current axes.
    Mutually exclusive with `size`, `figsize` and facets.
  * **hue** (`Hashable` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – If passed, make faceted line plots with hue on this dimension name.
  * **subplot_kws** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict), *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)).
  * **\*\*kwargs** (**optional**) – Additional keyword arguments for Matplotlib.

#### SEE ALSO
[`xarray.DataArray.squeeze`](xarray.DataArray.squeeze.html.md#xarray.DataArray.squeeze)
