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)
  }
}

Try the loon.ggplot package in your browser

Any scripts or data that you put into this service are public.

loon.ggplot documentation built on May 29, 2024, 4:58 a.m.