[R] Adding name labels to x-axis of matplot

From: Daniel Brewer <daniel.brewer_at_icr.ac.uk>
Date: Wed, 26 Mar 2008 11:10:00 +0000


Hello,

I have a gene expression matrix with columns being samples and rows being genes. I would like to display the expression values for each gene. I have two groups which I colour differently. The aim is to see if there is any difference between the two groups consistently across genes.

So the following works well:

matplot(as.matrix(nonormexpr),pch=16,col=c(rep(1,length(left)),rep(2,length(right))),cex=0.4)

The only thing is that the x-axis has numbers 1 ... 10, whereas I would like to give them the names of the genes. I have tried using the "labels" parameter but I get:

Error in axis(side, at, as.graphicsAnnot(labels), tick, line, pos, outer, :

        'labels' is supplied and not 'at'

Any ideas? Is there are a more appropriate plot type?

-- 

**************************************************************
Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.brewer_at_icr.ac.uk
**************************************************************
The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the a...{{dropped:2}} ______________________________________________ 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 Wed 26 Mar 2008 - 11:30:55 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 Wed 26 Mar 2008 - 13:30:23 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