as.pdf.default {plotscale} | R Documentation |
Converts object to PDF. By default, device is scaled by plot size. Device is automatically closed and file argument is returned.
## Default S3 method:
as.pdf(x, width = getOption("plotscale_pdf_width", 3),
height = getOption("plotscale_pdf_height", 3), devsize = if (scaled)
"devsize" else "unscaled", scaled = getOption("plotscale_scaled", TRUE),
onefile = TRUE, file = if (onefile) "Rplots.pdf" else "Rplot%03d.pdf",
...)
x |
object |
width |
desired plot width |
height |
desired plot height |
devsize |
a function of x, width, height, and ... that calculates device size |
scaled |
whether to rescale width and height by plot size |
onefile |
logical: passed to |
file |
file name passed to |
... |
other arguments to |
(invisible) the file argument
Other as.pdf: as.pdf
Other devices: as.pdf
,
as.png.default
, as.png
options(example.ask = FALSE)
options(device.ask.default = FALSE)
library(lattice)
as.pdf(xyplot(2~3),file = tempfile())