Re: [R] add only selected labels using thigmophobe

From: David Winsemius <>
Date: Sun, 13 Jun 2010 09:09:34 -0700 (PDT)


joerg wrote:
> I am trying to label data points within a scatter plot using thigmophobe.
> While the data set consists of about 3000 points I only would like to
> label a subset of these points.
> I read the x and y coordinates in from a txt file and define them as:
> MLPM1<-log2(Ratio.M.L.G2.PM)
> HLG2<-log2(Ratio.H.L..G2.PM)
> the names and a corresponding ID are read in from the same txt file as:
> GENE<-(Gene.Names)
> ID<-(id)
> plotting is:
> plot(x=MLPM1,y=HLG2,main='G2 vs PM',xlab='Fold change M/L PM',ylab='Fold
> change H/L G2)',xlim=c(-7,7),ylim=c(-7,7))
> labelling of the whole dataset I can do with:
> thigmophobe.labels(MLPM1,HLG2,labels=c(GENE),col=c(2:6,8:12),font=2)
> but how can I label only a few points from the whole dataset with names or
> IDs ??

#Loading required package: plotrix
#starting httpd help server ... done
 dta <- data.frame(a=rlnorm(20), b=rlnorm(20))  with( dta, plot(a,b))
 with( dta[c(2,7,10), ], thigmophobe.labels(a, b, labels=c('A', 'B', 'C') ) )


View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 13 Jun 2010 - 18:07:28 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 Sun 13 Jun 2010 - 18:10:29 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive