Code example:
EmigProb<-c(rep(seq(0.1,0.8,length=5),4),rep(seq(0.1,0.8,length=5),4)) RemainEmigProb<-c(rep(0.2,5),rep(0.4,5),rep(0.6,5),rep(0.8,5),rep(0.2,5),rep(0.4,5),rep(0.6,5),rep(0.8,5)) Value<-rnorm(40,5,3) Parameter<-c(rep("Survival",20),rep("Resight",20)) fakedata<-data.frame(EmigProb=EmigProb,RemainEmigProb=RemainEmigProb,Value=Value,Parameter=Parameter) q <-ggplot(fakedata,aes(EmigProb,Value,shape=factor(RemainEmigProb),colour=factor(Parameter),linetype=factor(RemainEmigProb)))+scale_colour_discrete("Parameter")+scale_linetype_discrete("Remain Emigrant Probability")+scale_shape_manual("Remain Emigrant Probability",values=c(0,5,6,15)) q <- q + layer(geom="point") q <- q + layer(geom="line") q

In this example, is there a way to remove “points” from the “Parameter” legend for “Relaxation” and “Survival”?
r ggplot2
user1399311 Jul 10 '12 at 16:13 2012-07-10 16:13
source share