## Not run: ------------------------------------
# dataset(mtcars)
# p1 <- ggplot(mtcars, aes(x = mpg, y = as.factor(cyl), fill = vs)) + geom_point()
# p2 <- ggplot(mtcars, aes(x = mpg, y = as.factor(cyl), fill = vs)) + geom_boxplot()
# grid_arrange_shared_legend(p1, p2)
## ---------------------------------------------
Run the code above in your browser using DataLab