I've just graphed a number of lines using ggplot2 on a graph and want to add a legend to the graph. I followed the same general procedure as a number of websites show and people suggested on this site but the legend just doesn't seem to be showing up!
Can someone help me on how to make the legend appear in this graph?
The following is the code I used for making the graph and attempting to add a legend:
e<-ggplot(dataset,aes(y=Index_SE))
e1<-e+geom_smooth(aes(x=Professionals),model=lm,colour="black",show.legend=TRUE)
e2<-e1+geom_smooth(aes(x=Health_Social),model=lm,colour="blue",show.legend=TRUE)
e3<-e2+geom_smooth(aes(Manufacturing),model=lm,colour="green",show.legend=TRUE)
e4<-e3+geom_smooth(aes(Machniery_Operators),model=lm,colour="red",show.legend=TRUE)
e5<-e4+ggtitle("Types of Employment vs Index of Socioeconomic Advantage and Disadvantage")
e6<-e5+xlab("Profession Prevelance in LGA(%)")+ylab("Index of Socioeconomic Advantage and Disadvantage")
final<-e6+theme(legend.position=c(35,850),legend.justification=c(35,850))+scale_colour_manual(name="Legend",values=c("Professionals"="black","Health and Social"="blue","Manufacturing"="green","Machinery Operators"="red"))