I just try to make a line chart and add a legend to it using ggplot in R. The following is my code.
ggplot(mtcars, aes(x=mpg, y=wt)) + geom_line(stat = "identity") + scale_fill_identity(name = "", guide = "legend", labels = c("myLegend"))
The legend is not shown in the plot and what I want is the following:

which I plot using Matlab. Could anyone tell me how to do it in R? Thank you so much!!

