[R] could I remove or move points in locator() based on plot()?

2013-08-02 Thread Klot Lee
Hi, The function locator() allows me to add points by mouse on function plot() I have draft. But the points can not be edit once I have made the click. How can I remove or just move the points I made on the draft? I use the locator function like this: plot(1,1) locator(type=o) Thanks.

Re: [R] could I remove or move points in locator() based on plot()?

2013-08-02 Thread David Winsemius
On Aug 2, 2013, at 2:26 AM, Klot Lee wrote: Hi, The function locator() allows me to add points by mouse on function plot() I have draft. But the points can not be edit once I have made the click. How can I remove or just move the points I made on the draft? You cannot. The plotting model

Re: [R] could I remove or move points in locator() based on plot()?

2013-08-02 Thread Daniel Guetta
Depending on the complexity of your graphic, you could also just re-draw the entire thing every time you want to make a change. Daniel On Fri, Aug 2, 2013 at 10:17 AM, David Winsemius dwinsem...@comcast.netwrote: On Aug 2, 2013, at 2:26 AM, Klot Lee wrote: Hi, The function locator()

Re: [R] could I remove or move points in locator() based on plot()?

2013-08-02 Thread David Carlson
You cannot move or edit them interactively, but you can save the locations of those points by using: a - locator(type=o) # e.g. click on three locations a $x [1] 0.8559376 1.1778126 1.2340626 $y [1] 1.2256976 1.2501162 0.8402324 You could now delete or modify the points and then use lines()

Re: [R] could I remove or move points in locator() based on plot()?

2013-08-02 Thread Greg Snow
The function put.points.demo in the TeachingDemos package allows you to add points, delete points, and move points on a scatterplot (and also computes some summaries based on the points). It actually uses locator behind the scenes and redraws the plot each time, but it gives the effect. If that

Re: [R] could I remove or move points in locator() based on plot()?

2013-08-02 Thread Klot Lee
Maybe I have to white a function for the purpose base on loacator. Thanks for the reply. 2013/8/3 David Carlson dcarl...@tamu.edu You cannot move or edit them interactively, but you can save the locations of those points by using: a - locator(type=o) # e.g. click on three locations a

Re: [R] could I remove or move points in locator() based on plot()?

2013-08-02 Thread Klot Lee
Thanks. I have tried put.points.demo, it helps, maybe some more modify then it would be suitable for me. Thank you again. 2013/8/3 Greg Snow 538...@gmail.com The function put.points.demo in the TeachingDemos package allows you to add points, delete points, and move points on a scatterplot