diff --git a/NAMESPACE b/NAMESPACE index 90bf6e3d..fa10f8b3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -81,6 +81,7 @@ importFrom(grDevices, pdf, png, recordGraphics, + recordPlot, svg, xy.coords ) diff --git a/R/tinyplot.R b/R/tinyplot.R index 36c26c43..f813a73b 100644 --- a/R/tinyplot.R +++ b/R/tinyplot.R @@ -470,7 +470,7 @@ #' out existing `plot` calls for `tinyplot` (or its shorthand alias `plt`), #' without causing unexpected changes to the output. #' -#' @importFrom grDevices axisTicks adjustcolor cairo_pdf chull colorRampPalette dev.cur dev.list dev.off dev.new extendrange hcl.colors hcl.pals jpeg palette palette.colors palette.pals pdf png svg xy.coords +#' @importFrom grDevices axisTicks adjustcolor cairo_pdf chull colorRampPalette dev.cur dev.list dev.off dev.new extendrange hcl.colors hcl.pals jpeg palette palette.colors palette.pals pdf png recordPlot svg xy.coords #' @importFrom graphics abline arrows axis Axis axTicks box boxplot grconvertX grconvertY hist lines mtext par plot.default plot.new plot.window points polygon polypath segments rect text title #' @importFrom utils modifyList head tail #' @importFrom stats na.omit setNames @@ -1759,6 +1759,8 @@ tinyplot.default = function( env = getNamespace('tinyplot') ) } + + invisible(recordPlot()) }