如何调整GGR中的边距排列ggpubr ggplot(轴元素消失)R

如何调整GGR中的边距排列ggpubr ggplot(轴元素消失)R,r,ggplot2,ggpubr,R,Ggplot2,Ggpubr,我想使用ggarrange将3个绘图堆叠成1个,但底部绘图的x轴元素(日期)总是消失 ggarrange(plot_1, plot_3, plot_2 + rremove("x.text"), nrow = 3, align = "h") 例如,此处缺少plot_3(Z)的轴元素 ggarrange(plot_1, plot_2, plot_3 + rremove("x.text"), nrow = 3, align = "h") 当我改变顺序时

我想使用
ggarrange
将3个绘图堆叠成1个,但底部绘图的x轴元素(日期)总是消失

ggarrange(plot_1, plot_3, plot_2 + rremove("x.text"), 
          nrow = 3, align = "h")
例如,此处缺少
plot_3
(Z)的轴元素

ggarrange(plot_1, plot_2, plot_3 + rremove("x.text"), 
          nrow = 3, align = "h")

当我改变顺序时,
plot_2
(Y)的轴元素现在消失了

ggarrange(plot_1, plot_3, plot_2 + rremove("x.text"), 
          nrow = 3, align = "h")

我试图调整每个
ggplot
中的边距,但同样的问题仍然存在。所以,我想这一定与
ggarrange
中的边距有关


顺便说一句,我还尝试删除前两个绘图的所有x轴标题,保留最后一个(底部)绘图的标题,但日期仍然丢失。

我认为函数theme()会很有用

ggarrange(plot_1, plot_2, plot_3 + rremove("x.text"), 
          nrow = 3, align = "h")+
  theme(plot.margin = margin(0.1,0.1,2,0.1, "cm")) 

 

但是你不是用
rremove(“x.text”)
ps删除它们吗?看看你是否也希望面板对齐!我怎么会错过这个?!!