Hi, Suppose I have a the data frame given by: > dput(toy.df) structure(list(id = c(1, 2, 1, 2), time = c(1L, 1L, 2L, 2L), value = c(1, 2, 2, 3)), .Names = c("id", "time", "value"), row.names = c(NA, 4L), class = "data.frame")
that is: > toy.df id time value 1 1 1 1 2 2 1 2 3 1 2 2 4 2 2 3 I can create a "spaghetti" plot with the command: > ggplot(toy.df,aes(x=time,y=value,group=id,color=factor(id))) + geom_line() What I'd like to be able to do is jitter the lines themselves by translation so that their slopes are preserved, but so far my attempts to jitter -- within ggplot, as opposed to first jittering toy.df by hand -- seem to always jitter the two points for a given id independently, and thus change the slopes. I'd be grateful for any guidance! Thanks, David ______________________________________________ R-help@r-project.org mailing list 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.