Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(ggplot2)
- library(gtable)
- a = ggplot(data=diamonds, aes(x=price)) + geom_histogram()
- b = ggplot(data=iris, aes(x=Sepal.Length, y=Sepal.Width)) + geom_point()
- agg = ggplot_gtable(ggplot_build(a))
- bgg = ggplot_gtable(ggplot_build(b))
- g = gtable(width=unit(c(0.3, 0.5), "null"), height = unit(1, "null"))
- g = gtable_add_grob(g, agg, 1,1)
- g = gtable_add_grob(g, agg, 1,2)
- plot(g)
Add Comment
Please, Sign In to add comment