Click the points that should be connected as polygon. Input ends with right click (see grid::grid.locator()). Polygon will be drawn closed.

map.sel.poly(data, pch = 19, size = 0.3, ...)

sel.poly(pch = 19, size = 0.3, ...)

Arguments

data

hyperSpec object for plotting map or list returned by plot_map()

pch

symbol to display the points of the polygon for sel.poly()

size

size for polygon point symbol for sel.poly()

...

further arguments for grid::grid.points() and grid::grid.lines()

Value

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

Details

map.sel.poly is a convenience wrapper for plot_map(), sel.poly, and sp::point.in.polygon(). For customized plotting, the plot can be produced by plot_map(), plot_voronoi() 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).

Author

Claudia Beleites, Sebastian Mellor

Claudia Beleites

Examples