multiple ggplots overall title

ggplot2, r

Solution

use the `gridExtra` library and the function `grid.arrange` to do this. Example:

 p1 <-qplot(factor(cyl), data=mtcars, geom="bar")
 library(gridExtra)
 grid.arrange(p1, p1, p1, p1, main = "Overall Title")

See `?grid.arrange` for more options.

Problem

Hi I am using a solution that is on Cookbook for R to plot multiple ggplots in one go...i.e. the code from this bottom of the page on this link http://wiki.stdout.org/rcookbook/Graphs/Multiple%20graphs%20on%20one%20page%20(ggplot2)/ I would like to add an overall title to this plot but am not sure how to do it. i.e. I would like to be able to have an amended function that has the additional argument for title like the below ``` multiplot(..., plotlist=NULL, file, cols=1, layout=NULL, title="") ``` any help would be much appreciated

Original source