ggarrange 没有绘制每个 ggplot 对象

问题描述

我正在尝试使用 8 绘制 ggplot ggarrange 对象,以便在每行中绘制 4 ggplot 对象,因此绘图网格有 two 行(nrow = 2)。但是下面的代码没有正确返回绘图,如下所示。如何解决这个问题?附带说明一下,当我使用 nrow = 1 绘图时,所有 8 个绘图都正确显示

gg.arrange = ggarrange(ggplot1,ggplot2,ggplot3,ggplot4,ggplot5,ggplot6,ggplot7,ggplot8,nrow = 2,labels = c("A","B","C","D","E","F","G","H"),common.legend = TRUE,legend = "bottom")

enter image description here

enter image description here

解决方法

ggarrange()

ggarrange() 显然需要 nrowncol,因此将 ncol = 4 添加到您的代码中。