segments {graphics}R Documentation

Add Line Segments to a Plot

Description

Draw line segments between pairs of points.

Usage

segments(x0, y0, x1 = x0, y1 = y0,
         col = par("fg"), lty = par("lty"), lwd = par("lwd"),
         ...)

Arguments

x0, y0

coordinates of points from which to draw.

x1, y1

coordinates of points to which to draw. At least one must be supplied.

col, lty, lwd

graphical parameters as in par, possibly vectors. NA values in col cause the segment to be omitted.

...