[R] mouse-clicking on xy-plot
Walmes Zeviani
walmeszeviani at hotmail.com
Fri Apr 2 22:24:48 CEST 2010
You can use identify() to obtain coordinates from plotted points but if you
want any coordinates you could use locator():
> plot(1:10)
> loc <- locator(n=3)
> str(loc)
List of 2
$ x: num [1:3] 2.3 5.4 8.29
$ y: num [1:3] 6.15 8.33 2.6
> points(loc$x, loc$y, col=2)
>
Walmes.
-----
..ooo0
...................................................................................................
..(....)... 0ooo... Walmes Zeviani
...\..(.....(.....)... Master in Statistics and Agricultural
Experimentation
....\_)..... )../.... walmeszeviani at hotmail.com, Lavras - MG, Brasil
............
(_/............................................................................................
--
View this message in context: http://n4.nabble.com/mouse-clicking-on-xy-plot-tp1749562p1749586.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list