Hi, I'm trying to make a ggplot() graph with a custom legend, but without success, it is simple, I have somethink like this in traditional plot:
plot(y~x) curve(equation1,lty=1) curve(equation2,lty=2) legend(x,y,legend=c("equation 1","equation 2"),lty=c(1,2),bty="n"). In my ggplot graph I have this sequence: ggplot(data1, aes(x=x1, y=y1))+ geom_point()+ geom_smooth(method="glm", family="gaussian")+ geom_smooth(aes(x=x1, y=y1,lty=2,data=data2, method="glm", family="gaussian")+ theme(plot.title = element_text(lineheight=.8, face="bold"))+ theme_bw() The problem is that legend only work in automatic way, I try some option to add a manual legend in ggplot like the traditional legend() command. Anybody can help-me? Thanks Ronaldo -- > Prof. Ronaldo Reis J�nior | .''`. UNIMONTES/DBG/Lab. Ecologia Comportamental e Computacional | : :' : Campus Universit�rio Prof. Darcy Ribeiro, Vila Mauric�ia | `. `'` CP: 126, CEP: 39401-089, Montes Claros - MG - Brasil | `- Fone: (38) 3229-8192 | ronaldo.r...@unimontes.br | http://www.ppgcb.unimontes.br/lecc | LinuxUser#: 205366 [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.