R/ggCompound.R

Defines functions ggCompound

ggCompound <- function(plots,
                       setBackground = TRUE,
                       fill.bg = loon::l_getOption("background"),
                       colour.bg = loon::l_getOption("background")) {

  if(setBackground) {
    do.call(patchwork::wrap_plots, plots) &
      ggplot2::theme(
        plot.background = ggplot2::element_rect(fill = fill.bg,
                                                colour = colour.bg)
      )
  } else {
    do.call(patchwork::wrap_plots, plots)
  }
}
great-northern-diver/loon.ggplot documentation built on March 20, 2023, 8:03 p.m.