I have searched for an answear on the site and found a lot of material. It looks like those work for everyone but me. I cannot make a legend at my ggplot. I tried also scale_colour_manual option but it does not work. None of the plots have a legend. I cannot find any working solution and I hope you can help me. Tried even to restart a computer :)
Here is my code and data:
ggplot(vec_freq_bind, aes(x=vec_freq_bind[,3])) +
geom_line(aes(y=vec_freq_bind[,2]),
color="#69b3a2", size=2, alpha=0.9, linetype=2,show.legend = TRUE) +
geom_line(aes(y=vec_freq_bind[,5]),
color="#BB4444", size=2, alpha=0.9, linetype=2,show.legend = TRUE) +
scale_color_discrete(name = "Y series", labels = c("Y2", "Y1"))
Here is the data:
vec_freq_bind[,3] [1] 10 20 30 40 50 60 70 80 90
vec_freq_bind[,2] [1] 1164 606 352 198 148 104 63 43 23
vec_freq_bind[,5] [1] 1025 598 375 249 189 106 67 38 21