Hi, why does the following not create the legend I am expecting with the last line?
library(dplyr)
library(ggplot2)
df <- data.frame(x=c(1,2,3,4,5), y=c(2,4,6,8,10), z=c(3,6,9,12,15))
df %>%
ggplot() +
geom_line(aes(x = x, y = y), color="blue") +
geom_line(aes(x = x, y = z), color="red") +
scale_color_manual(values=c("blue", "red"), labels=c("Alabama sales of blue widgets",
"Arizona sales of red widgets"))