I have made a ggplot of the insulin conc. at different timepoints (OGTT) for two different treatments. Afterwards I have added points showing the mean values:
p<-ggplot(data=data2, aes(x = factor(OGTT), y = Insulin, group = StudyID, color=StudyID)) +
geom_line() +
facet_grid(End.start ~Treatment)+
stat_summary(aes(group = Treatment), geom = "point", fun.y = mean, shape = 16, size = 2)
My questions are:
- How can I add errorbars to the mean value points?
- How can I avoid that the plot shows any legends?