我想在一幅图上绘制出两个统计线,两个数据包的X轴是相同的,于是我将两个数据合并为一个dF3。但是这样做出来的图是重叠在一条横线上的,我想把mean1_p与mean2_p上下错开可以吗?怎么才能将mean2_p的线放置于mean1_p线条的下方呢?感谢各位大佬呀!!!!
fills=c('1'="blue",'2'="yellow")
F1<-ggplot(dF3)+
geom_point(aes(Trait, y=mean1_p,fill="1"),stat="identity",shape=21,size=4)+
geom_point(aes(Trait, y=mean2_p,fill="2"),stat="identity",shape=21,size=4)+
geom_errorbar(aes(Trait,ymin=cl1_p, ymax=cu1_p), width=.1, size=0.5)+
geom_errorbar(aes(Trait,ymin=cl2_p, ymax=cu2_p), width=.1, size=0.5)+
geom_text(aes(label=st1,Trait, y=245,hjust=0), size=3)+
geom_text(aes(label=st2,Trait, y=245,hjust=0), size=3)+
coord_flip(ylim = c(-20,280))+ scale_x_discrete(limits =rev(levels(dF3$Trait)))+
geom_hline(aes(yintercept=0),linetype="dashed",colour="black")+
xlab("")+ylab("COF Effect size(%)") +
theme_bw()+ theme(axis.line = element_line(colour = "black",size=0.2),
panel.grid.major = element_blank(),panel.grid.minor =
element_blank(),panel.background = element_blank())+
theme(strip.background = element_blank(), strip.placement = "outside")+
scale_colour_hue(l=40)+
theme(legend.position="none")