| lines {graphics} | R Documentation |
A generic function taking coordinates given in various ways and joining the corresponding points with line segments.
lines(x, ...)
## Default S3 method:
lines(x, y = NULL, type = "l", col = par("col"),
lty = par("lty"), ...)
x, y |
coordinate vectors of points to join. |
type |
character indicating the type of plotting; actually any of
the types as in plot. |
col |
color to use. This can be vector of length greater than one, but only the first value will be used. |
lty |
line type to use. |
... |
Further graphical parameters (see par) may
also be supplied as arguments, particularly, line type, lty and
line width, lwd. |
The coordinates can be passed to lines in a plotting structure
(a list with x and y components), a ="R argblock">
rectw, hleft, toptextx, ylength(legend),
giving the x and y coordinates of the legend's text(s).returned invisibly.
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.
plot, barplot which uses legend(), and
text for more examples of math expressions.
## Run the example in '?matplot' or the following:
leg.txt <- c("Setosa Petals", "Setosa Sepals",
"Versicolor Petals", "Versicolor Sepals")
y.leg <- c(4.5, 3, 2.1, 1.4, .7)
cexv <- c(1.2, 1, 4/5, 2/3,