# xarray.plot.hist

### xarray.plot.hist(darray, , figsize=None, size=None, aspect=None, ax=None, xincrease=None, yincrease=None, xscale=None, yscale=None, xticks=None, yticks=None, xlim=None, ylim=None, \*\*kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/plot/dataarray_plot.py#L686-L761)

Histogram of DataArray.

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

Plots *N*-dimensional arrays by first flattening the array.

* **Parameters:**
  * **darray** ([`DataArray`](xarray.DataArray.html.md#xarray.DataArray)) – Can have any number of dimensions.
  * **figsize** (`Iterable` of [`float`](https://docs.python.org/3/builtins/functions.html#float), *optional*) – A tuple (width, height) of the figure in inches.
    Mutually exclusive with `size` and `ax`.
  * **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.
  * **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`.
  * **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` and `figsize`.
  * **xincrease** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Should the values on the *x* axis be increasing from left to right?
    if `None`, use the default for the Matplotlib function.
  * **yincrease** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – Should the values on the *y* axis be increasing from top to bottom?
    if `None`, use the default for the Matplotlib function.
  * **xscale, yscale** (`{'linear', 'symlog', 'log', 'logit'}`, *optional*) – Specifies scaling for the *x*- and *y*-axis, respectively.
  * **xticks, yticks** ([array-like](https://numpy.org/doc/stable/glossary.html#term-array_like), *optional*) – Specify tick locations for *x*- and *y*-axis.
  * **xlim, ylim** (`tuple[float`, `float]`, *optional*) – Specify *x*- and *y*-axis limits.
  * **\*\*kwargs** (**optional**) – Additional keyword arguments to [`matplotlib.pyplot.hist()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.hist.html#matplotlib.pyplot.hist).
