I am trying to create a legend for my scatterplot however, the colors do not match. Rather the output is displayed like the image below. plot output
Any help is appreciated, thank you!
Here is my code:
ggplot() +
geom_point(data = dfreq, aes(x = as.numeric(month), y = dnorm, color = "Dallas"), shape = 21, fill = "#899AD6", size = 3) +
geom_line(data = dfreq, aes(x = as.numeric(month), y = dnorm, color = "Dallas")) +
geom_point(data = lfreq, aes(x = as.numeric(month), y = lnorm, color = "Los Angeles"), shape = 21, fill = "#E47080", size = 3) +
geom_line(data = lfreq, aes(x = as.numeric(month), y = lnorm, color = "Los Angeles")) +
ggtitle("Crime by Month in Dallas vs. Los Angeles") +
xlab("Month") + ylab("Frequency of Crime") +
scale_color_manual(name = "City", values = c("Dallas" = "#899AD6", "Los Angeles" = "#E47080")) +
theme(axis.text = element_text(size = 7)) +
scale_x_continuous(name = "Month", breaks = 1:12, labels = month.name[1:12])