I am a new R user and I am trying to add a legend to my lines plot. This is the command line that I used to make the plot and the relative plot.
ggplot(crab_tag$daylog, aes(Date))+ geom_line(aes(y=-Max.Depth), color="blue")+ geom_line(aes(y=-Min.Depth),color="violet")+ labs(x="Date",y="Depth(m)")+ theme(legend.position = c(0,1),legend.justification = c(0,1)) +scale_color_manual(values = c("blue","violet"))
Anyone can help me to see my error? Thanks!