ggarrange 不绘制每个 ggplot 对象

ggarrange not plotting every ggplot object

我正在尝试使用 ggarrange 绘制 8 ggplot 个对象,以便在每一行中绘制 4 个 ggplot 对象,因此绘图网格具有 two 行(nrow = 2)。但是下面的代码没有 return 正确地显示如下图。这怎么能解决?附带说明一下,当我使用 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")

ggarrange()

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