support "any" graphic device
- shift temp-file generation from time-based to 'tempfile()', reduces
the (slim) possibility of same-name images being created (e.g.,
parallel production, fast rendering)
- add some graphic helper funcs for generalizing things across all
'spec_*' plotting functions: is_svg, dev_chr, and graphics_dev
- add 'make_inline_plot' to centralize formation of the
'kableExtraInlinePlots' object; prepend 'file:///' to paths when not
is_latex, fixes display of some raster graphics; added "list" as a
secondary class
- add 'listify_args' to enable any single-plot function to be able to
vectorize any of its arguments (so that different plots on different
rows can have different arguments)
- update 'spec_plot' to use these mechanisms
diff --git a/man/spec_plot.Rd b/man/spec_plot.Rd
index 1917de1..829bae8 100644
--- a/man/spec_plot.Rd
+++ b/man/spec_plot.Rd
@@ -29,7 +29,7 @@
max = minmax,
dir = if (is_latex()) rmd_files_dir() else tempdir(),
file = NULL,
- file_type = if (is_latex()) "png" else "svg",
+ file_type = if (is_latex()) "pdf" else "svg",
...
)
}
@@ -85,8 +85,9 @@
\item{file}{File name. If not provided, a random name will be used}
-\item{file_type}{Graphic device. Support \code{png} or \code{svg}. SVG is recommended
-for HTML output.}
+\item{file_type}{Graphic device. Can be character (e.g., \code{"pdf"})
+or a graphics device function (\code{grDevices::pdf}). This defaults
+to \code{"pdf"} if the rendering is in LaTeX and \code{"svg"} otherwise.}
\item{...}{extra parameters passing to \code{plot}}
}