Marking in ggplot
I want to be able to label three line plots in ggplot with a legend for each row, so in the plot we can determine which row is associated with which. Here's my current setup:
ggplot(Months, aes(x = Month_Num)) +
geom_line(aes(y = A), colour = "blue") +
geom_line(aes(y = B), colour = "green") +
geom_line(aes(y = C), colour = "red")+
ylab(label = "Total") +
xlab("Month Num") +
ggtitle("Total by Month Num")
How do I create a legend for lines A, B and C? Thank,
+3
source to share