I have a 3 lines, one is dashed and others are solid. I have to add legend for dashed and solid lines. But the legend is not shown in the plot.
plot <- data_this_shop %>%
ggplot(aes(x=id, y= price)) +
geom_point(size = 1.5) +
geom_line(aes(y=mean(price)), linetype = "dashed") +
geom_line(data = data_other_shops, aes(x=id, y=lower_95), linetype = "solid") +
geom_line(data = data_other_shops, aes(x=id, y=upper_95), linetype = "solid") +
scale_linetype_manual(values = c("dashed", "solid"),
labels = c( "Mean price", "95% CI"))
Can anyone help please?