I've plotted this graph. However, I want to add legend which shows the colour and name of the series. I tried to use fill = Freq
, bet the results don't even look close to the results I am expecting. Any suggestions?
The code I am using:
p = ggplot(data = data, aes(x = Date, y = Freq)) + geom_line()
p = p + geom_line(aes(x = Date, y = Freq2), colour = "red")
p = p + geom_line(aes(x = Date, y = Freq3), colour = "blue")
p = p + scale_x_datetime(labels = date_format("%m"),
breaks = date_breaks("months"))