library(ggplot2)
library(see)
p1 <- ggplot(mtcars, aes(x = disp, y = mpg)) +
geom_point()
p2 <- ggplot(mtcars, aes(x = mpg)) +
geom_density()
p3 <- ggplot(mtcars, aes(x = factor(cyl))) +
geom_bar() +
scale_x_discrete("cyl")
plots(p1, p2)
plots(p1, p2, n_columns = 2, tags = "A")
plots(
p1, p2, p3,
n_columns = 1, tags = c("Fig. 1", "Fig. 2", "Fig. 3"),
title = "The surprising truth about mtcars"
)
Run the code above in your browser using DataLab