I would like to increase the font size of ggtitle and also the font should be bold. My code is as follows.
ggplot(df, aes(x1, y = value, colour = variable)) + geom_point(size=2) + ggtitle("male vs.female") + theme(axis.text=element_text(size=14), axis.title=element_text(size=14,face="bold")) + theme(legend.text=element_text(size=12)) + labs(x = "x axis", y = "y axis") + ylim(0,100) + xlim(0,100) + scale_colour_manual(values = c("red", "blue"), labels = c("male", "female"))
Use theme(), here is an example :
ggplot(cars, aes(x=speed,y=dist)) + ggtitle("cars") + geom_point() + theme(plot.title = element_text(size = 40, face = "bold"))
Inspired by this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With