R/print-plot.R

#' Print Plot
#'
#' Function to use an print_plot(gp) in place of print(gp) as catches error and retries.
#'
#' @param x The plot object to plot.
#' @export
print_plot <- function (x) {
  if (inherits(try(print(x), silent = TRUE), "try-error"))
    try(print(x))
  invisible(x)
}
poissonconsulting/poiscon documentation built on Feb. 18, 2021, 11:16 p.m.