I am struggling to add a dashed line to my legend. I include the linetype = 2 in my geom line for the value-weighted line however, the dashed rendition of the line does not show in the legend. I am wondering if this is possible with just a minor addition to the ggplot code. Thanks for the help.
ggplot(data, aes(x=Date)) +
geom_line(aes(y=data$`Equal-Weighted`, col="Equal-Weighted")) +
geom_line(aes(y=data$`Value-Weighted`, col="Value-Weighted"), linetype = 2) +
labs(title=,
subtitle=,
caption="", y="", x = "Year") + # title and caption
scale_x_date(labels = lbls, breaks = brks) + # change to monthly ticks and labels
scale_color_manual(name="",
values = c("Equal-Weighted"="#0000FF", "Value-Weighted"="#FF0000")) + # line color
theme(panel.grid.minor = element_blank()) + # turn off minor grid
theme(axis.text.x = element_text(angle = 90, vjust=0.5, size = 8), # rotate x axis text
panel.grid.minor = element_blank()) +
scale_y_continuous(expand = c(0, 0), limits = c(0, NA))