[BioC] Point plot against labels and reordering

James W. MacDonald jmacdon at med.umich.edu
Wed Apr 18 16:43:53 CEST 2007


Hi Dan,

Daniel Brewer wrote:
> Hi,
> 
> I am getting really frustrated with trying to create a specific plot.  I
> have the following matrix (monkey):
>     Exon      PRC1     PRC2     PRC3
> 1  0_110 2.0132845 1.484080 1.923869
> 2   0_34 2.6528139 1.141114 1.242584
> 3   0_78 1.6247146 1.230726 1.592407
> 4     10 1.4471323 1.137777 1.426656
> 5     11 1.5471201 1.204736 1.500566
> 6      2 1.0423570 1.104883 1.087180
> 7      3 0.9563367 1.017354 1.067159
> 8      4 1.4577586 1.166938 1.422878
> 9      5 1.5081813 1.177205 1.494983
> 10     6 1.4432391 1.144851 1.396613
> 11     7 1.6995243 1.337146 1.643418
> 12     8 1.3848549 1.096389 1.357165
> 13     9 1.4995867 1.162944 1.444809
> 
> Exon is the Exon number of a label saying which two exons the probe is
> in-between.  That column should be treated as labels, not numeric.
> 
> What I would like to be able to do is plot for example PRC1 on the
> y-axis and the Exon as the x-axis labels (just evenly spaced not a
> numeric scale).  Secondly I would like to be able to reorder the labels
> for the plot.
> 
> The closest I have got is:
> plot(monkey$Exon,monkey$PRC1)

Does

plot(1:dim(monkey)[1], monkey$PRC1, xaxt="n")
axis(1, at=1:dim(monkey)[1], labels = monkey$Exon, las=2)

do what you want?

Best,

Jim

	
> 
> But that seems to be producing a boxplot rather than points.  If I put
> type="p" it makes no difference and if I try and reorder the matrix it
> does not make any difference either e.g.
> monkey$Exon[c(6,7,2,8,9,10,11,3,12,13,4,5,1)]
> 
> monkey$Exon is a factor object
> 
> Any help would be great.
> 
> Dan
> 


-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623


**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.



More information about the Bioconductor mailing list