I have this code:
ggplot() +
stat_smooth(data=fd.area.dfa.quant,aes(x=area,y=q50),alpha=0.6,colour="Red")+
stat_smooth(data=fd.area.dfb.quant,aes(x=area,y=q50),alpha=0.6,colour="Green")+
stat_smooth(data=fd.area.cfa.quant,aes(x=area,y=q50),alpha=0.6,colour="Purple")+
stat_smooth(data=fd.area.csb.quant,aes(x=area,y=q50),alpha=0.6,colour="Blue")+
stat_smooth(data=fd.area.bsk.quant,aes(x=area,y=q50),alpha=0.6,colour="Orange")+
scale_x_log10("xlab",expand = c(0, 0),labels=comma)+
scale_y_log10("ylab", expand = c(0, 0.05),labels=comma)+
theme(aspect.ratio=1)+
ggtitle("title")+
ggsave("save2.png")
This is the figure
I would like to
- Add a name each to the five lines (say: DFA,DFB,CFA,CSB,BSK)
- After that, I want to display the names in the show_guide with the corresponding color.
P.S. all lines are of various sizes and hence I am avoiding melting.
How can I do it?