I have followed the advice on the discussion
changing title in multiplot ggplot2 using grid.arrange
but my 2-line title doesn\'t change the font size.
You could go in a different direction and use ggplot2 latest build from github
:
library(ggplot2) # (github version) devtools::install_github("hadley/ggplot2")
p <- ggplot(cars, aes(x=speed, y=dist))
p <- p + theme_bw()
p <- p + geom_bar(fill="blue", stat="identity")
p <- p + labs(title="Fast Cars",
subtitle="Are more Fun")
p <- p + theme(axis.text.x=element_text(angle=90, hjust=0, vjust=1))
p <- p + theme(plot.title=element_text(size=30, hjust=0.5, face="bold", colour="darkgreen", vjust=-1))
p <- p + theme(plot.subtitle=element_text(size=20, hjust=0.5, face="italic", color="darkred"))
p
This was added pretty recently here: https://github.com/hadley/ggplot2/pull/1582
let me know if it works!