Draw a polygons around a certains set of points.
encircle(x, y = NULL, nb.pt = 20, off.set = 1, ...)
x | the x coordinates of a set of points. Alternatively, a
single argument |
---|---|
y | the y coordinates of a set of points. |
nb.pt | the number of points to be generated around each coordinates. |
off.set | the y coordinates of a set of points. |
... | further arguments to be passed to |
The technique employed is fairly simple: for a set of coordinates x, y handled
using xy.coords
a set of nb.pt
number is generated at a
off.set
distance of each coordinates, then a convex is drawn around
the coordinates using grDevices::chull()
.
encircle(coords, border='#7b11a1', lwd=2)