as.pdf.default {plotscale} | R Documentation |
Convert to PDF by Default
Description
Converts object to PDF. By default, device is scaled by plot size. Device is automatically closed and file argument is returned.
Usage
## 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",
...)
Arguments
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 |
Value
(invisible) the file argument
See Also
Other as.pdf: as.pdf
Other devices: as.pdf
,
as.png.default
, as.png
Examples
options(example.ask = FALSE)
options(device.ask.default = FALSE)
library(lattice)
as.pdf(xyplot(2~3),file = tempfile())
[Package plotscale version 0.1.6 Index]