0
我用下面的代碼創建了一個分組的條形圖。我想將錯誤欄的寬度調整爲當前寬度的一半。但是,width = 0.5
對結果沒有影響。我應該怎麼做?如何調整用stat_summary_bin創建的錯誤欄的寬度?
library(ggplot2)
# ggplot2_2.2.1
df <- iris
set.seed(1)
df$group <- sample(c('I', 'II'), nrow(df), replace = T)
ggplot(df, aes(x = group, y = Sepal.Width, fill = Species)) +
stat_summary_bin(fun.data = "mean_cl_normal",
geom = 'bar', position = 'dodge') +
stat_summary_bin(fun.data = "mean_cl_normal",
geom = 'errorbar', position = 'dodge', width = 0.5)
雖然這產生我想要的形象,這不適合'stat_summary_bin'工作。你有什麼主意嗎? – mt1022
對不起,目前沒有,也許是別人? – Wolf