locator(n=500, type="n", noclick=F)
If noclick=TRUE is specified, an additional component, n, gives the status of the locator device (typically a numeric encoding of the states of the mouse buttons).
Some devices that don't allow real interaction will prompt you for an x,y pair.
amp;# user points at an outlier which is then labelled text(locator(1), "outlier") amp;# position a legend legend(locator(1), legend=c("IBM", "AT&T", "GM"), fill=2:4) lines(locator()) # input a number of points, connect with line locator(type="l") # alternative