alittleboy alittleboy - 1 month ago 17
R Question

increase legend font size ggplot2

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!

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.