Hi

If you are really wedded to heatmap(), you could also use 'gridGraphics', something like this ...

library(gridGraphics)
grid.newpage()
pushViewport(viewport(0, .5, .5, .5, just=c("left", "bottom")))
grid.echo(function() { heatmap(test) }, newpage=FALSE)
popViewport()
pushViewport(viewport(.5, 0, .5, .5, just=c("left", "bottom")))
grid.echo(function() { heatmap(test) }, newpage=FALSE)
popViewport()

Paul

On 24/07/17 01:12, Jeff Newmiller wrote:
The answer is "don't do that" because that function abuses par. Use lattice or 
ggplot2 with grid graphics to plot multiple heatmaps.

https://stackoverflow.com/questions/15114347/to-display-two-heatmaps-in-same-pdf-side-by-side-in-r


--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
p...@stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to