Hello I am generating report with rmarkdown
I decided to use ggplot2 graphs as it seems that knitr rmarkdown ggplot2 works better together.
I'd like to globally increase the axis labels, tick label, title of my ggplot2 plots in the html_notebook document rmarkdown::render'ed.
Can I do this in the yaml or by setting something in a global chunk option ?
You could use theme_update() in the setup chunk of your rmarkdown document to modify the active theme, overwriting the defaults for all subsequent plots. For example:
```{r setup, include=FALSE}
library(ggplot2)
theme_update(# axis labels
axis.title = element_text(size = 30),
# tick labels
axis.text = element_text(size = 20),
# title
title = element_text(size = 50))
```
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