Klot Lee
2013-Aug-02 09:26 UTC
[R] could I remove or move points in locator() based on plot()?
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. [[alternative HTML version deleted]]
David Winsemius
2013-Aug-02 17:17 UTC
[R] could I remove or move points in locator() based on plot()?
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 for base graphics is indelible ink. The best you could do would be to plot white on top of black. -- David.> > I use the locator function like this: > >> plot(1,1) >> locator(type="o") > > > Thanks. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius Alameda, CA, USA
Greg Snow
2013-Aug-02 19:30 UTC
[R] could I remove or move points in locator() based on plot()?
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 does not do what you want, you may be able to modify the function (pure R code) to do what you need. On Fri, Aug 2, 2013 at 3:26 AM, Klot Lee <fff200200@gmail.com> 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? > > I use the locator function like this: > > > plot(1,1) > > locator(type="o") > > > Thanks. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Gregory (Greg) L. Snow Ph.D. 538280@gmail.com [[alternative HTML version deleted]]