Arrange multiple ggplot2 plots in the same image window
[This article was first published on Getting Genetics Done
, and kindly contributed to R-bloggers
]. (You can report issue about the content on this page here
Want to share your content on R-bloggers? click here
if you have a blog, or here
if you don't.
In a previous tutorial I showed you how to create plots faceted by the level of a third variable using ggplot2. A commenter asked about using faceted plots and viewports and reminded me of this function I found in the ggplot2 Google group. The arrange function below is similar to using par(mfrow=c(r,c)) in base graphics to put more than one plot in the same image window.
vp.layout <- function(x,
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook