60

I have managed to make a 2x2 plot using grid.arrange:

library(gridExtra)
grid.arrange(p1,p3,p2,p4, ncol=2, nrow=2, top = "Daily QC: Blue")

The main title of this multiplot is very small. Is there a way to change the title text size and font.

baptiste
  • 75,767
  • 19
  • 198
  • 294
moadeep
  • 3,988
  • 10
  • 45
  • 72

2 Answers2

85
main=textGrob("Daily QC: Blue",gp=gpar(fontsize=20,font=3))

Edit with v>=2.0.0 of gridExtra, main has become top (for consistency with bottom, left and right).

baptiste
  • 75,767
  • 19
  • 198
  • 294
gd047
  • 29,749
  • 18
  • 107
  • 146
54

Due to changes in both packages grid and gridExtra, the current answer is outdated. Library package grid is also required to use textGrob and gpar.

The new code should include both packages:

library(grid)
library(gridExtra)
grid.arrange(p1,p3,p2,p4, ncol=2, nrow=2,
     top = textGrob("Daily QC: Blue",gp=gpar(fontsize=20,font=3)))
MBorg
  • 1,345
  • 2
  • 19
  • 38