ggplot2 position_dodge 不工作。我能怎么做?

ggplot2 position_dodge is not working. How can I do?

我试着用这个脚本做图

dodge <- position_dodge(0.5)

original_results <- read.table(file="D:/input.dat", heade=T)
library(bear)
aa <- original_results
aa = aa[,-1]
aa.m =  melt(aa, id="minC")
dfc <- summarySE(aa.m, measurevar="value", groupvars=c("minC", "variable"))
dev.new(width=6, height=5)

ggplot(dfc, aes(x=minC, y=value, ymax=1, colour=variable, group=variable)) +
geom_errorbar(aes(x=minC, ymin=value-sd, ymax=value+sd), width=0.02,  position=dodge) + labs(title=titler) + 
geom_line(position=dodge) + 
geom_point(aes(shape=variable), size=3, position=dodge) +   
 theme_bw()

但是,由于dodge变量不起作用,所以结果不清楚 你能给我一些处理这个问题的小技巧吗?

数据=link

我通过增加 position_dodge 值解决了这个问题。

谢谢 Ben bolker!