.BG
.FN polygon
.TL
polygon: Shade in a Polygonal Figure
.CS
polygon(x, y, density, angle, border)
.PP
.AG x,y
coordinates of the vertices of a polygon, listed in order,
i.e., the `i'th point is connected to the `i+1'st.
It is assumed the polygon closes by joining the last point to the first.
A structure containing components `x' and `y' can also be
given.
Missing values (NAs) are allowed and signify breaks between polygons.
.AG density
density of shading lines in lines per inch.
If `density' is zero, no shading will occur.
If `density' is negative, the polygon will be filled solidly
using the graphic device
hardware polygon-filling algorithm.
Default -1 if `angle' is not specified; 5 if `angle' is given.
.AG angle
angle of shading lines in degrees measured counterclockwise
from horizontal.  Default 45.
.AG border
should border of polygonal region be drawn? Default TRUE.
Default FALSE.
.PP
Graphical parameters may also be supplied as arguments to this
function (see `par').
.EX
polygon(rdpen(type="l"))  # read pen positions, draw and shade polygon
polygon( c(x1,rev(x2)), c(y1,rev(y2)) )
   # shade the area between lines x1,y1 and x2,y2
polygon( c(px1,NA,px2), c(py1,NA,py2) )
   # two polygons px1,py1 and px2,py2 separated by NA
.KW plot*
.KW aplot*
.WR
