# xarray.plot.line¶

xarray.plot.line(darray, *args, row=None, col=None, figsize=None, aspect=None, size=None, ax=None, hue=None, x=None, y=None, xincrease=None, yincrease=None, xscale=None, yscale=None, xticks=None, yticks=None, xlim=None, ylim=None, add_legend=True, _labels=True, **kwargs)

Line plot of DataArray index against values

Parameters
darrayDataArray

Must be 1 dimensional

figsizetuple, optional

A tuple (width, height) of the figure in inches. Mutually exclusive with size and ax.

aspectscalar, optional

Aspect ratio of plot, so that aspect * size gives the width in inches. Only used if a size is provided.

sizescalar, optional

If provided, create a new figure for the plot with the given size. Height (in inches) of each plot. See also: aspect.

axmatplotlib axes object, optional

Axis on which to plot this figure. By default, use the current axis. Mutually exclusive with size and figsize.

huestring, optional

Dimension or coordinate for which you want multiple lines plotted. If plotting against a 2D coordinate, hue must be a dimension.

x, ystring, optional

Dimensions or coordinates for x, y axis. Only one of these may be specified. The other coordinate plots values from the DataArray on which this plot method is called.

xscale, yscale‘linear’, ‘symlog’, ‘log’, ‘logit’, optional

Specifies scaling for the x- and y-axes respectively

xticks, yticksSpecify tick locations for x- and y-axes
xlim, ylimSpecify x- and y-axes limits
xincreaseNone, True, or False, optional

Should the values on the x axes be increasing from left to right? if None, use the default for the matplotlib function.

yincreaseNone, True, or False, optional

Should the values on the y axes be increasing from top to bottom? if None, use the default for the matplotlib function.