Skip to content
Prev 374662 / 398513 Next

drc, ggplot2, and gridExtra

On Fri, 18 May 2018, Ed Siefker wrote:

            
Hi,

If you grab the plots as grobs, you can arrange them using grid.arrange()

library(gridGraphics)
library(gridExtra)

grab <- function{
 	grid.echo()
 	grid.grab()
}

x <- rnorm(100, 1, 2)
y <- rnorm(100, 0, 0.5)

plot(x,y)
p <- grab()

a <- rnorm(20, 0, 1)
b <- rnorm(20, 1, 2)

plot(a, b)
q <- grab()

grid.arrange(p, q)


Best,
Eivind K. Dovik
Bergen, NO