Labeling in ggplot

Viewed 136

I want to be able to label three line graphs in ggplot with a legend for each line so on the graph we can tell which line associates with what. Here is my current set up:

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 can i create a legend for line A, B and C? Thanks,

2 Answers
Related