ggplot2: Define plot layout with grid.arrange() as argument of do.call()
问题 I want to obtained an unbalanced grid of plots such as require(ggplot2) require(gridExtra) df <- data.frame(value1 = rnorm(200), value2 = rnorm(200), value3 = rnorm(200), value4 = rnorm(200)) p1 <- ggplot(df) + geom_density(aes(x=value1)) p2 <- ggplot(df) + geom_density(aes(x=value2)) p3 <- ggplot(df) + geom_density(aes(x=value3)) p4 <- ggplot(df) + geom_density(aes(x=value4)) grid.arrange(p1, arrangeGrob(p2,p3,p4, ncol=3), heights=c(2.5/4, 1.5/4), ncol=1) but using a function myplot <-