This code:
ggplot(mapping = aes(x = x, y = y)) +
geom_line(data = error_Legendre, aes(colour = "Legendre")) +
geom_line(data = error_LLm10, aes(colour = "LL")) +
xlab('x') +
ylab('y')+
scale_colour_manual(
values = c("blue", "red")
)+theme(axis.text=element_text(size=20))
changes correctly the axis text. I would like to change the size of the legend, i.e. Legendre and LL.
add this in your theme : +theme(axis.text=element_text(size=20), legend.text = element_text(size=10))
but do know there are several options for core text, titles, etc. This page lists the options : https://www.statology.org/ggplot2-legend-size/
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