[R] heatmaps and layouts

Joseph Clark joeclark77 at hotmail.com
Mon Jul 9 22:13:22 CEST 2012

With base graphics, you could use par(mfrow) or par(mfcol) to define a simple layout.

I don't know anything about heatmap.2, but I have used image() to make heatmaps and have laid them out with par(mfrow).

Two ways to get a 2 row by 3 column layout, for example:


par(mfrow = c(3,2))  # 3 items across each row, 2 rows

par(mfcol = c(2,3))  # 2 items down each column, 3 columns

Start with the par() statement, then each new plot() or image() or whatever will appear in a different position in the layout, as you specify. Again I have no idea if it'll work with heatmap.2.




// joseph w. clark , phd candidate
\\ usc marshall school of business

> Date: Mon, 9 Jul 2012 15:41:36 -0400
> From: soni.tanu at gmail.com
> To: r-help at r-project.org
> Subject: [R] heatmaps and layouts
> I'm using R to create a heatmap from a matrix using heatmap.2 - and i want
> to group these images into one big image - What i usually use to achieve
> this is layout() - but this doesn't work, as heatmap.2 uses layout, and
> apparently layout does not work recursively.
> Does anyone have any suggestions on how to group together 2 images without
> layout, or how to make layout support recursive calls?
> I have asked this question before and somebody asked this question in a
> different forum but there is no proper answer for this question yet .
> [[alternative HTML version deleted]]
> ______________________________________________
> 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. 		 	   		  

More information about the R-help mailing list