From 223710621f6d2fb899a5d45924fe1139580d15da Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Fri, 26 Apr 2024 18:28:03 -0400 Subject: [PATCH] Replace `ggpubr::ggarrange` with `cowplot::plot_grid` --- book/graphs/other/brg01.qmd | 4 ++-- book/graphs/other/bwg01.qmd | 8 ++++---- package/DESCRIPTION | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/book/graphs/other/brg01.qmd b/book/graphs/other/brg01.qmd index ea44e77b15..9fbe478cdb 100644 --- a/book/graphs/other/brg01.qmd +++ b/book/graphs/other/brg01.qmd @@ -270,8 +270,8 @@ tbl <- ggplot(sd_l, aes(x = ACTARM, y = stat_lbl, label = value)) + theme_bw() + tbl_theme -plot <- ggpubr::ggarrange(graph, tbl, - heights = c(4, 1), +plot <- cowplot::plot_grid(graph, tbl, + rel_heights = c(4, 1), ncol = 1, nrow = 2, align = "v" ) plot diff --git a/book/graphs/other/bwg01.qmd b/book/graphs/other/bwg01.qmd index 0bb6ff36eb..fd3b60d6d0 100644 --- a/book/graphs/other/bwg01.qmd +++ b/book/graphs/other/bwg01.qmd @@ -329,8 +329,8 @@ tbl_1 <- ggplot(adlb_long, aes(x = ARMCD, y = type_lbl, label = stat), vjust = 1 labs(caption = "The whiskers extend to the minimum and maximum values.") + theme_bp -plot <- ggpubr::ggarrange(bp_annos(bp_9, oc), tbl_1, - heights = c(4, 2), +plot <- cowplot::plot_grid(bp_annos(bp_9, oc), tbl_1, + rel_heights = c(4, 2), ncol = 1, nrow = 2, align = "v" ) plot @@ -349,8 +349,8 @@ tbl_2 <- adlb_long %>% labs(caption = "The whiskers extend to the minimum and maximum values.") + theme_bp -plot <- ggpubr::ggarrange(bp_annos(bp_9, oc), tbl_2, - heights = c(6, 1), +plot <- cowplot::plot_grid(bp_annos(bp_9, oc), tbl_2, + rel_heights = c(6, 1), ncol = 1, nrow = 2, align = "v" ) plot diff --git a/package/DESCRIPTION b/package/DESCRIPTION index 32af1bfe87..baf2b660da 100644 --- a/package/DESCRIPTION +++ b/package/DESCRIPTION @@ -13,12 +13,12 @@ Depends: Suggests: binom, broom, + cowplot, DescTools, dplyr, forcats, formatters, ggplot2, - ggpubr, ggrepel, grid, knitr,