πΎ Xarray is now 10 years old! π

# xarray.plot.hist#

xarray.plot.hist(darray, *args, 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]#

Histogram of DataArray.

Plots N-dimensional arrays by first flattening the array.

Parameters:
• darray (`DataArray`) β Can have any number of dimensions.

• figsize (`Iterable` of `float`, optional) β A tuple (width, height) of the figure in inches. Mutually exclusive with `size` and `ax`.

• aspect (`"auto"`, `"equal"`, scalar or `None`, optional) β Aspect ratio of plot, so that `aspect * size` gives the width in inches. Only used if a `size` is provided.

• size (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`, optional) β Axes on which to plot. By default, use the current axes. Mutually exclusive with `size` and `figsize`.

• xincrease (`bool` or `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` or `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, 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()`.