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

Daniel Brewer daniel.brewer at icr.ac.uk
Wed Mar 26 12:10:00 CET 2008


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}}



More information about the R-help mailing list