Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buildChart <- function(p) {
- gt <- ggplot_gtable(ggplot_build(p))
- t <- gtable_filter(gt, "title")[[1]]
- l <- gtable_filter(gt, "guide-box")[[1]]
- p <- p + theme(legend.position = "none", plot.title = element_blank())
- built <- grid.arrange(
- arrangeGrob(
- t[[1]],
- l[[1]],
- p,
- nrow = 3,
- heights = c(1, 1.2, 10)
- )
- )
- return(built)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement