erich studerus
unread,Feb 16, 2009, 2:48:48 PM2/16/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
Hello,
I want to show the cumulative distribution functions of several groups
within one plot. When I use the geom_step function the lines get
connected between different groups. Is there a way to avoid this? I
want geom_step behaving the same way as geom_line. Here's an example:
x <- sort(rnorm(47))
df1<-data.frame(y=x,x=seq_along(x),z='A')
x <- sort(rnorm(47))
df2<-data.frame(y=x,x=seq_along(x),z='B')
df <-rbind(df1,df2)
qplot(data=df,x=x,y=y,colour=z)+geom_step() #lines get scrambled
qplot(data=df,x=x,y=y,colour=z)+geom_line() #lines from different
groups are separated
Thanks a lot!