[R] locator()
Erin Hodgess
hodgess at gator.dt.uh.edu
Sat Jun 4 05:53:12 CEST 2005
Dear Sebastian:
Here is a snippet of code that you may find interesting
for labeling points on the plane:
plane1 <- function(x,main1="") {
plot(x,main=main1,ylab=" ")
zz <- locator()
text(zz$x,zz$y,
labels=paste("(",round(zz$x,1),
",",round(zz$y,1),")",sep=""),
pos=2,cex=.55)
invisible()
}
Hope this helps!
Sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgess at gator.uhd.edu
More information about the R-help
mailing list