Displaying 1 result from an estimated 1 matches for "getcoords".
2005 Jun 04
2
locator() via tcltk
...gather locator() data. I've read Peter's articles in Rnews, the help
pages in tcltk, http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/,
plus a post in R-help sometime ago, but haven't found a solution.
The idea goes something like this:
require(tcltk)
testplot <- function() {
getcoords <- function(...) {
locator(5)
}
x <- 1:1000
y <- rnorm(1000)
plot(x, y)
base <- tktoplevel()
loc.pts <- tkbutton(base, text = "Get coordinates", command = getcoords)
quit.but <- tkbutton(base, text = "Quit",
command = fu...