寻找一种方法来保持所有的酒吧相同的宽度,并留下一个空白的地方,数据丢失。有什么办法吗?
p = ggbarplot(avg_neighb_ct, x = "First.Object.cellType", y = "count",
fill = "data", merge = TRUE, add = "mean_se", width = 0.75) +
theme_classic() +
theme(axis.title.x = element_blank(),
axis.title.y = element_text(size = 20),
axis.text.x = element_text(size = 20, angle = 90, hjust = 1),
axis.text.y = element_text(size = 20),
legend.title = element_blank(),
legend.text = element_text(size = 16)) +
ylab("Count")
p
- 编辑**
已添加position = position_dodge2(preserve = "single")
现在我的误差线被关掉了
1条答案
按热度按时间uttx8gqw1#
将
position = position_dodge(preserve = "single")
添加到对ggbarplot
的调用中在没有可重现问题的情况下,从软件包文档中改编的示例证明了这一点:
创建于2023-06-13带有reprex v2.0.2