Hi all,
I am using geom_pointrange to create a scatter plot for several
conditions that I map to different colors. The problem I have is that
the legend shows thick lines that dont look very good. I want to plot
points in the legend for example.
I can use geom_point and geom_linerange separately including
legend=FALSE for the last one, but the problem is that I am using
jittering to avoid overplotting and naturally the jitter for the
points and error bars should be the same so I guess I cannot use these
to geoms separately.
The following toy code shows the thick lines in the legend I am
talking about:
df<-data.frame(x=c(1,2),y=c(2,3),ymin=c(1.8,2.7),ymax=c(2.2,3.1))
p<-ggplot(data=df,aes(x=x,y=y,ymin=ymin,ymax=ymax,color="condition"))
p + geom_pointrange()
thanks
dani
--
Daniel Linares
web:
www.dlinares.org