[BioC] Heatmap color Key

James W. MacDonald jmacdon at med.umich.edu
Mon Mar 31 18:37:08 CEST 2008


Hi Khalid,

s.khalid at qmul.ac.uk wrote:
> Dear all,
> 
> I have recently started using R to draw heatmaps and have worked with  
> several heatmaps in different packages(stats,gplots,heatplus etc).
> 
> heatmap.2 using Heatplus does exactly what I am after, except for one  
> thing.  I would like to move the location of the color key from the  
> top left to the bottom of the heatmap, and also alter its size to the  
> length of the heatmap.
> 
> Whilst I am able to alter various labels of the colorkey (i.e. x and y  
> axis), I am unable to successfully move its position and resize it  
> into a rectangle.

While doable, this will require a bit of hacking. The heatmap.2() 
function uses layout() to set up the plotting device so you would have 
to change the parameters passed to that function in order to change the 
plotting regions, then change the plotting order so things get plotted 
in the correct region.

If I were to attempt such a thing, I would likely just create another 
function by cutting and pasting the relevant portions of heatmap.2() 
together in the required order, and adjusting the input to layout() to 
make the upper left plotting region large enough for the heatmap image, 
and the bottom right region smaller.

See ?layout.

Best,

Jim


> 
> Thank you to anyone who can help me
> 
> Khalid
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

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



More information about the Bioconductor mailing list