How to change the default font size in ggplot2

jeannot picture jeannot · Aug 14, 2012 · Viewed 74.1k times · Source

I'd like to know if it is possible to change some default parameters of ggplot2 graphics, like font size for instance, for a whole R session. The idea is to avoid setting them for each plot.

Answer

Luciano Selzer picture Luciano Selzer · Aug 14, 2012

Use theme_set()

theme_set(theme_gray(base_size = 18))
qplot(1:10, 1:10)

enter image description here