raivokolde / pheatmap

Pretty heatmaps
227 stars 83 forks source link

Multiple pheatmaps in a same figure #35

Open Zefeng-Wu opened 7 years ago

Zefeng-Wu commented 7 years ago

how to make multiple pheatmaps in a same figure? The plot layout code "par(mfrow=c(m,n))"doesn't work!

zhenyisong commented 6 years ago

The above code is for the basic plot not for grid plotting. I think.

caravagn commented 5 years ago

Just grab the output tables as pheatmap(..., silent = TRUE)$gtable, and then combine the GROBs with the arrangeGrob function from the gridExtra package.

See: https://cran.r-project.org/web/packages/gridExtra/vignettes/arrangeGrob.html

mmahmoudian commented 3 years ago

What @caravagn explained is very correct. If you are looking for a code snippet, checkout my answer in this Stackoverflow from back in January 2018:

https://stackoverflow.com/a/48151399/1613005