带有GGPLOT标签的问题与GGARRANGE

问题描述 投票:0回答:2
label.x

,但这并没有改变事物。

这是我的代码和情节:

ggarrange(plot1,plot2,plot3,
          common.legend=TRUE,
          labels = c("asdf", "asdfasdf", "asdfasdfasdfsadfasdf"),
          hjust=-0.8,
          ncol = 2, nrow = 2)

	

我不确定这是否是您问题的缩短,但是尝试这可能会有所帮助: enter image description here plot1 <- plot1 + theme(legend.position="left")+ labs(title="asdf") plot2<- plot2 + theme(legend.position="left")+ labs(title="asdfasf") plot3 <- plot3 + theme(legend.position="left")+ labs(title="asdfasdfasfdsas") ggarrange(plot1,plot2,plot3, common.legend=TRUE, hjust=-0.8, ncol = 2, nrow = 2) 您可以检查:

Https://www.royfrancis.com/customising-ggplot2/
r ggplot2 ggpubr
2个回答
4
投票

在我的看法中,您可以使用
geom_text()

首先为每个图设置标签,然后使用ggarrange()将所有子图都放在一起。


1
投票

迟到了,但是我遇到了同样的问题并解决了(至少对我有用)。
对于您的情况,请尝试
hjust = c(0,0,0)
。这可能起作用。
祝你好运
    

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.