R/cat-plot-code.R

Defines functions cat_plot_code

cat_plot_code <- function(p) {
  if (!inherits(p, "ggplot"))
    stop("input must be a ggplot2 object")
  cat(
    paste0(get_plot_code(p), collapse = " +\n  ")
  )
}
wcmbishop/gogoplot documentation built on May 29, 2019, 10:39 a.m.