R – increase legend font size ggplot2

ggplot2r

Is there a way to increase the font size in ggplot2? I think I need to specify something like legend.key.width = unit(2, "line") in the theme function, but that is used to adjust the keys in legends, not the font sizes. Thanks!

Best Answer

You can use theme_get() to display the possible options for theme. You can control the legend font size using:

+ theme(legend.text=element_text(size=X))

replacing X with the desired size.