I have some example data and a plot below. I would like to get a line
to connect the points for each treatment. I have not
been able to do this maybe because it is dodged. Any suggestions?
Thanks,
Juliet
library(ggplot2)
myData <- structure(list(treatment = c(0L, 0L, 100L, 100L, 200L, 200L,
200L, 600L, 0L, 100L, 600L), time = structure(c(1L, 3L, 2L, 3L,
1L, 2L, 3L, 2L, 2L, 1L, 1L), .Label = c("1a", "1b", "1c"), class = "factor"),
mean = c(8.351316, 8.200078, 10.355362, 8.709843, 10.336664,
10.404017, 8.984964, 10.519717, 7.955357, 10.301795, 10.35637
), uci = c(8.592008, 8.454073, 10.65889, 9.105403, 10.62428,
10.754237, 9.425563, 10.710556, 8.402852, 10.301795, 10.530051
), lci = c(8.110625, 7.946084, 10.051834, 8.314283, 10.049048,
10.053798, 8.544365, 10.328879, 7.507862, 10.301795, 10.182688
)), .Names = c("treatment", "time", "mean", "uci", "lci"), class =
"data.frame", row.names = c(NA,
-11L))
p <- ggplot(myData)
p <- p + geom_pointrange(aes(x=time,y=mean,ymin=lci,ymax=uci,colour=factor(treatment)),position=position_dodge(width=1))
p
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
Thanks for the suggestion.
I do need to get the graph in the form I was trying. It was requested
in the form
I described.
Thanks again for your help.
Regards,
Juliet