\Header{lines}{Add Connected Line Segments to a Plot}
\alias{lines.default}{lines}
\keyword{aplot}{lines}
\begin{Usage}
\begin{verbatim}
lines(x, ...)
lines.default(x, y=NULL, type="l", col=par("col"), ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x, y}] coordinate vectors of points to join.
\item[\texttt{type}] character indicating the type of plotting; actually any of
the \texttt{type}s as in \texttt{\Link{plot}(..)}.
\item[\texttt{col}] color to use.
\item[\texttt{...}] Further graphical parameters (see \texttt{\Link{par}}) may
also be supplied as arguments, particularly, line type, \texttt{lty} and
line width, \texttt{lwd}.
\end{ldescription}
\end{Arguments}
\begin{Description}
\texttt{lines} is a generic function taking the coordinates given in the \texttt{x}
and \texttt{y} vectors and joining the corresponding points with line segments.
The coordinates can alternatively be passed to \texttt{lines}
in a plotting structure (a list with x and y components),
a time series, etc.\end{Description}
\begin{SeeAlso}
\texttt{\Link{points}}, \texttt{\Link{plot}}, and the underlying ``primitive''
\texttt{\Link{plot.xy}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(cars)
# draw a smooth line through a scatter plot
plot(cars, main="Stopping Distance versus Speed")
lines(lowess(cars))
\end{ExampleCode}
\end{Examples}

