

   lines {base}                                 R Documentation

   AAdddd CCoonnnneecctteedd LLiinnee SSeeggmmeennttss ttoo aa PPlloott

   DDeessccrriippttiioonn::

        A generic function taking coordinates given in various
        ways and joining the corresponding points with line
        segments.

   UUssaaggee::

        lines(x, ...)
        lines.default(x, y=NULL, type="l", col=par("col"), ...)

   AArrgguummeennttss::

       x, y: coordinate vectors of points to join.

       type: character indicating the type of plotting; actu-
             ally any of the `type's as in `plot(..)'.

        col: color to use.

        ...: Further graphical parameters (see `par') may also
             be supplied as arguments, particularly, line type,
             `lty' and line width, `lwd'.

   DDeettaaiillss::

        The coordinates can be passed to `lines' in a plotting
        structure (a list with x and y components), a time
        series, etc.

   SSeeee AAllssoo::

        `points', `plot', and the underlying ``primitive''
        `plot.xy'.

   EExxaammpplleess::

        data(cars)
        # draw a smooth line through a scatter plot
        plot(cars, main="Stopping Distance versus Speed")
        lines(lowess(cars))

