I am quite new to R and am attempting to plot three time series lines simultaneously in one graph (using different colors) making use of ggplot2. And I would like to add legend for the three lines but cannot produce the legend for the graph. Your suggestions are highly appreciated.
Codeggplot ggplot(vn, aes(x=date)) + `ggplot enter code here`
geom_line(aes(y = newcase),size=1, color="red") +
geom_line(aes(y = recovered),color="blue", size=1)+
geom_line(aes(y = confirmed), color="green", linetype="solid", size=1)+
xlab("Date")+
ylab("People")+
scale_x_date(date_breaks = "1 week", date_labels = "%d/%m")
Data
Date confirmed recovered newcase
2020-03-15 56 16 0
2020-03-16 61 16 4
2020-03-17 66 16 3
2020-03-18 75 16 7