ngon | R Documentation |
Draws a regular polygon at specified coordinates as an outline or shaded.
ngon (xydc, n=4, angle=0, type=1)
xydc |
four element vector with |
n |
number of sides for polygon (>8 => circle). |
angle |
rotation angle of figure, in degrees. |
type |
|
Uses polygon
to draw shaded polygons and
lines
for outline. If n is odd, there is
a vertex at (0, d/2), otherwise the midpoint of a side is
at (0, d/2).
Invisible.
Denis White
polygon
,
lines
,
map.key
,
map.groups
plot (c(0,1), c(0,1), type="n") ngon (c(.5, .5, 10, "blue"), angle=30, n=3) apply (cbind (runif(8), runif(8), 6, 2), 1, ngon)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.