Re: [R] add only selected labels using thigmophobe

From: David Winsemius <dwinsemius_at_comcast.net>
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 ??
>
>

 require(plotrix)
#Loading required package: plotrix
 ?thigmophobe.labels
#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') ) )

-- 
David.

-- 
View this message in context: http://r.789695.n4.nabble.com/add-only-selected-labels-using-thigmophobe-tp2253497p2253549.html
Sent from the R help mailing list archive at Nabble.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.
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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive