[R] grid.locator

Gabor Grothendieck ggrothendieck at gmail.com
Sun Sep 25 21:27:41 CEST 2005


If I do:

library(lattice)
x <- 1:10
xyplot(x ~ x)
grid.locator()

and click on 2,2 say the I get this:

> grid.locator()
$x
[1] 201native

$y
[1] 476native

How do I get the user coordinates of the graph?

(If I did not use lattice/grid I could have just done:

plot(x ~ x)
locator()

and it would have worked as expected.)




More information about the R-help mailing list