Description Usage Arguments Details Value Author(s) See Also Examples
Click the points that should be connected as polygon. Input ends with right click (see
grid.locator
). Polygon will be drawn closed.
1 2 3 |
data |
hyperSpec object for plotting map or list returned by |
pch |
symbol to display the points of the polygon for |
size |
size for polygon point symbol for |
... |
further arguments for |
map.sel.poly
is a convenience wrapper for plotmap
, sel.poly
,
and point.in.polygon
. For custiomized plotting, the plot can be produced by
plotmap
, plotvoronoi
or levelplot
, and the result of
that plot command handed over to map.sel.poly
, see the example below.
If even more customized plotting is required,sel.poly
should be used (see example).
map.sel.poly
: array of indices for points within the selected polygon
sel.poly
: n x 2 matrix with the corner points of the polygon
Claudia Beleites, Sebastian Mellor
Claudia Beleites
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | if (interactive ()){
## convenience wrapper
map.sel.poly (chondro)
## customized version
data <- sample (chondro [,, 1004 - 2i ~ 1004 + 2i], 300)
plotdata <- plotvoronoi (data, clusters ~ y * x, col.regions = alois.palette ())
print (plotdata)
map.sel.poly (plotdata)
## even more customization:
plotvoronoi (data)
## interactively retrieve polygon
polygon <- sel.poly ()
## find data points within polygon
require ("sp")
i.sel <- which (point.in.polygon (data$x, data$y, polygon [, 1], polygon [, 2]) > 0)
## work with selected points
grid.points (unit (data$x [i.sel], "native"), unit (data$y [i.sel], "native"))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.