[R] label points on a graph

From: Paul Adams <pma3622_at_yahoo.com>
Date: Sun, 08 Jun 2008 09:45:45 -0700 (PDT)

Hello everyone,
I have a plot and I am wanting to label points as 1 through 20 I have the following code for the plot:
dat<-read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\colon cancer1.txt",header=T,row.names=1) file.show(file="C:\\Documents and Settings\\Owner\\My Documents\\colon cancer1.txt") plot(dat[1:20,1:2],type='p',xlab='normal1',ylab='normal2',main='Two normal samples--first 20 genes',pch=15,col='blue') grid(nx=5,ny=5,col="black",lty="dotted",lwd=2) Do I use the label function text(x,y,names)? If so do I specify to put 1-20 above the points as text(5,5,1:20,pos=3)? Any help would be much appreciated

	[[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. Received on Sun 08 Jun 2008 - 16:53:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 09 Jun 2008 - 09:30:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive