Blame | Last modification | View Log | Download | RSS feed
\name{polygon}\title{Polygon Drawing}\usage{polygon(x, y, col=NULL, border=NULL, \dots) {}\alias{polygon}\arguments{\item{x,y}{vectors containing the coordinates of the verticesof the polygon.}\item{col}{an integer specifying the color to be used infilling the polygon. The default is to leave polygons unfilled.}\item{border}{the color to draw the border. The default is toleave the border undrawn.}\item{\dots}{graphical parameters can be given as arguments to \code{polygon}.}}\description{\code{polygon} draws the polygons whose vertices aregiven in \code{x} and \code{y}.Note that if neither of \code{col} or \code{border} is specifiedthen nothing is drawn.}\seealso{\code{\link{segments}} for even more flexibility,\code{\link{lines}}, \code{\link{rect}}, \code{\link{box}}, \code{\link{abline}}.}\examples{n <- 100xx <- c(0:n, n:0)yy <- c(c(0,cumsum(rnorm(n))), rev(c(0,cumsum(rnorm(n)))))plot (xx, yy, type="n", xlab="Time", ylab="Distance")polygon(xx, yy, col="gray")title("Distance Between Brownian Motions")}\keyword{aplot}