xarray.DataArray.plot.line¶
-
DataArray.plot.
line
(*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)[source]¶ Line plot of DataArray values.
Wraps
matplotlib.pyplot.plot()
.- Parameters
darray (
DataArray
) – Either 1D or 2D. If 2D, one ofhue
,x
ory
must be provided.figsize (
tuple
, optional) – A tuple (width, height) of the figure in inches. Mutually exclusive withsize
andax
.aspect (scalar, optional) – Aspect ratio of plot, so that
aspect * size
gives the width in inches. Only used if asize
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, the current is used. Mutually exclusive withsize
andfigsize
.hue (
str
, optional) – Dimension or coordinate for which you want multiple lines plotted. If plotting against a 2D coordinate,hue
must be a dimension.x, y (
str
, optional) – Dimension, coordinate or multi-index level for x, y axis. Only one of these may be specified. The other will be used for 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-axis, respectively.xticks, yticks (array-like, optional) – Specify tick locations for x- and y-axis.
xlim, ylim (array-like, optional) – Specify x- and y-axis limits.
xincrease (
None
,True
, orFalse
, optional) – Should the values on the x axis be increasing from left to right? ifNone
, use the default for the Matplotlib function.yincrease (
None
,True
, orFalse
, optional) – Should the values on the y axis be increasing from top to bottom? ifNone
, use the default for the Matplotlib function.add_legend (
bool
, optional) – Add legend with y axis coordinates (2D inputs only).*args, **kwargs (optional) – Additional arguments to
matplotlib.pyplot.plot()
.