Last "+theme_bw()" to be deleted.

Try this:

ggplot(data1, aes(x=x1, y=y1))+
  geom_point()+
  geom_smooth(method="glm", family="gaussian",aes(linetype="equation1"))+
  geom_smooth(aes(x=x1, y=y1, linetype="equation2"),data=data2, method="glm", 
family="gaussian")+
  scale_linetype_manual(values = c("solid","dashed"),name="Equations",
                        labels = c("Equation 1","Equation 2"),guide="legend")+
  theme(plot.title = element_text(lineheight=.8, face="bold"), 
legend.position="top")


--

GG

http://around-r.blogspot.it




        [[alternative HTML version deleted]]

______________________________________________
[email protected] 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.

Reply via email to