【发布时间】:2014-03-01 20:30:07
【问题描述】:
我正在为出版物准备一个人物。我通过设置xlab("") 省略了 x 标签,但是 ggplot2 会产生一个空格而不是完全删除标签。我怎样才能摆脱空白(在下图中用红色矩形标记)?
完整代码:
ggplot(data, aes(x=Celltype, y=Mean, fill=factor(Dose), label=p.stars)) +
geom_bar(stat = "identity", position = position_dodge(width=0.9), aes(group=Dose)) +
geom_errorbar(aes(ymin = Mean - SEM, ymax = Mean + SEM), stat = "identity", position = position_dodge(width=0.9), width=0.25) +
geom_text(aes(y = Mean + SEM), size = 5, position = position_dodge(width=0.9), hjust = .5, vjust = -1) +
xlab("") +
ylab("Concentration") +
scale_fill_grey(name = "Dose") +
theme_bw()
【问题讨论】:
标签: r ggplot2 whitespace