Direct labels puts labels at wrong place
问题 I'm trying to do a plot with ggplot2 and trying to put labels at the right place on mean trajectories with confidence regions. Since I cannot share my data, I created a reproducible example: set.seed(456) library(ggplot2) library(directlabels) time<-1:25 df2<-data.frame(time,value=runif(2500),group=as.factor(c(rep('Alpha',1250),rep('Beta',1250)))) ggplot(df2, aes(x=time, y=value,group=group,colour=group))+ stat_summary(geom="ribbon", fun.data=mean_cl_normal,fun.args=list(conf.int=0.95), fill=