[R] Odp: locator function and connecting segment
Petr PIKAL
petr.pikal at precheza.cz
Fri Jul 30 07:43:25 CEST 2010
Hi
r-help-bounces at r-project.org napsal dne 29.07.2010 18:50:20:
> Dear R People:
>
> I'm using the locator() function on a chart and I select two values.
>
> Is there a way already in place to connect the two values with a line
> segment, please?
I did this some time ago and put it to simple function
cara<-function(col=1,lty=1,lwd=1)
{body<-locator(2)
segments(body$x[1],body$y[1],body$x[2],body$y[2],col=col,lty=lty,lwd=lwd)}
regards
Petr
>
> Just thought I'd check before I started coding.
>
> Thanks in advance,
> Sincerely,
> Erin
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: erinm.hodgess at gmail.com
>
> ______________________________________________
> 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.
More information about the R-help
mailing list