Learn R Programming

xROI (version 0.9.20)

drawPolygon: Interactive drawing of a polygon

Description

This function provides an interactive tool for drawing of polygons by user clicks on the plotted graphics

Usage

drawPolygon(col = "#80303080", lty = 1, ...)

Arguments

col

a character string, color value of the polygon polygon

lty

a numeric value, lty variable as line type

...

passing graphical arguments

Value

the coodinates of the clicked points

Examples

Run this code
# NOT RUN {
#user can click to add vertices, pressing the Escape key would end it.
if(interactive()){
   drawPolygon()
}

# }

Run the code above in your browser using DataLab