[ top | up ]

Polygon Drawing

Syntax

polygon(x, y, col=NULL, border=NULL, ...) {

Arguments

x,y vectors containing the coordinates of the vertices of the polygon.
col an integer specifying the color to be used in filling the polygon. The default is to leave polygons unfilled.
border the color to draw the border. The default is to leave the border undrawn.
... graphical parameters can be given as arguments to polygon.

Description

polygon draws the polygons whose vertices are given in x and y. Note that if neither of col or border is specified then nothing is drawn.