This help topic is for R version 1.1. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/polygon.html
polygon {base}R Documentation

Polygon Drawing

Usage

polygon(x, y = NULL, density = -1, angle = 45, border=par("fg"), ...) {
}
{polygon}
{
\item{x,y}{vectors containing the coordinates of the vertices
  of the polygon.}
\item{density}{density of fill pattern. NOT YET implemented.}
\item{angle}{angle of fill pattern. NOT YET implemented.}
\item{border}{the color to draw the border.  Defaults to
  par("fg").  Use border=0 to omit borders.} 
\item{...}{graphical parameters can be given as arguments to
  polygon, must importantly,}
\item{col}{an integer specifying the color to be used in
  filling the polygon.  The default is to leave polygons unfilled.}
}
{
polygon draws the polygons whose vertices are
given in x and y.
}
{
  segments for even more flexibility,
  lines, rect, box, abline.
}       
{
n <- 100
xx <- 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", border = "red")
title("Distance Between Brownian Motions")
}
{aplot}

[Package base version 1.1 ]