Sunny Srivastava
2010-Mar-07 07:20 UTC
[R] How the change the dimension of an individual cell [i.e. the cell corresponding to an observation in data matrix] in a heatmap.2?
Dear R-Helpers, I have a short question related to heatmap.2 function. I wanted to change the dimension of each cell in the heatmap drawn by this function. here is a reproducible example from the help page library(gplots) data(mtcars) x <- as.matrix(mtcars) rc <- rainbow(nrow(x), start=0, end=.3) cc <- rainbow(ncol(x), start=0, end=.3) hv <- heatmap.2(x, col=cm.colors(255), scale="column", RowSideColors=rc, ColSideColors=cc, margin=c(5, 10), xlab="specification variables", ylab= "Car Models", main="heatmap(, ..., scale=\"column\")", tracecol="green", density="density") This gives me a heatmap similar to the 9th heatmap on this page. http://bm2.genes.nig.ac.jp/RGM2/R_current/library/gplots/man/heatmap.2.html Now, my question is - if I wanted to increase the dimension of each cell in this heatmap - say- from 1 inch x 2 inch to 3 inch x 4 inch ( it is OK if I can do this in terms of pixels). Is it possible to do this ? (It is equivalent to zooming the current heatmap) I tried increasing the image dimension but that did not work. I don't know if this is clear enough. Please accept my apologies in advance. Thanks and Best Regards, Sanvesh. [[alternative HTML version deleted]]