Learn R Programming

lgcp (version 1.8)

loc2poly: loc2poly function

Description

Converts a polygon selected via the mouse in a graphics window into an polygonal owin object. (Make sure the x and y scales are correct!) Points must be selected traversing the required window in one direction (ie either clockwise, or anticlockwise), points must not be overlapping. Select the sequence of edges via left mouse button clicks and store the polygon with a right click.

Usage

loc2poly(n = 512, type = "l", col = "black", ...)

Arguments

n

the maximum number of points to locate

type

same as argument type in function locator. see ?locator. Default draws lines

col

colour of lines/points

...

other arguments to pass to locate

Value

a polygonal owin object

See Also

lgcpPredict, identify.lgcpPredict

Examples

Run this code
# NOT RUN {
plot(lg)
# }
# NOT RUN {
 # lg an lgcpPredict object
# }
# NOT RUN {
subwin <- loc2poly())
# }

Run the code above in your browser using DataLab