R 增加ggplot中条之间的间距
我有一个:R 增加ggplot中条之间的间距,r,ggplot2,R,Ggplot2,我有一个: p您也可以调整位置减淡之外的宽度(在几何图形栏中) 或 dodge谢谢,但我仍然不清楚是什么控制因素之间的间距和治疗之间的间距。也就是说,我如何调整您的代码,使因素保持在一起,但稍微减小它们之间的间距?基本上是你的第二个插图,但有空格reduced@fugu只需将两个宽度(位置和条)都增加到,比如说,0.7 p <- ggplot(data=df, aes(x=Gene, y=FC, fill=expt, group=expt)) p <- p + geom_bar(c
p您也可以调整位置减淡
之外的宽度(在几何图形栏中
)
或
dodge谢谢,但我仍然不清楚是什么控制因素之间的间距和治疗之间的间距。也就是说,我如何调整您的代码,使因素保持在一起,但稍微减小它们之间的间距?基本上是你的第二个插图,但有空格reduced@fugu只需将两个宽度(位置和条)都增加到,比如说,0.7
p <- ggplot(data=df, aes(x=Gene, y=FC, fill=expt, group=expt))
p <- p + geom_bar(colour="black", stat="identity", position = position_dodge(width = 0.9))
p <- p + geom_errorbar(aes(ymax = FC + se, ymin = FC, group=expt),
position = position_dodge(width = 0.9), width = 0.25)
p
ggplot(data=df, aes(x=Gene, y=FC, fill=expt, group=expt)) +
geom_bar(colour="black", stat="identity", position = position_dodge(width = 0.8), width=0.5) +
geom_errorbar(aes(ymax = FC + se, ymin = FC, group=expt),
position = position_dodge(width = 0.8), width = 0.25)
dodge <- position_dodge(width = 0.5)
ggplot(data=df, aes(x=Gene, y=FC, fill=expt, group=expt)) +
geom_bar(colour="black", stat="identity", position=dodge, width=0.5) +
geom_errorbar(aes(ymax = FC + se, ymin = FC, group=expt),
position = dodge, width = 0.25)