hardcopy | R Documentation |
This function streamlines graphical output to the screen, pdf or ps
files. File names for hard copy devices can be generated
automatically from function names of the form g3.2
or
fig3.2
(the choice of alphabetic characters prior to
3.2
is immaterial).
hardcopy(width = 3.75, height = 3.75, color = FALSE, trellis = FALSE,
device = c("", "pdf", "ps"), path = getwd(), file =
NULL, format = c("nn-nn", "name"), split = "\\.",
pointsize = c(8, 4), fonts=NULL, horiz = FALSE, ...)
width |
width of plot in inches (sic!) |
height |
height of plot in inches (sic!) |
color |
(lattice plots only) TRUE if plot is not black on white only |
trellis |
TRUE if plot uses trellis graphics |
device |
screen "", pdf or ps |
path |
external path name |
file |
name of file to hold output, else |
format |
Alternatives are |
split |
character on which to split function name (file=NULL) |
pointsize |
Pointsize. For trellis devices a vector of length 2 giving font sizes for text and for points respectively |
fonts |
For postscript devices, specify families that will be used in addition to the intial device |
horiz |
FALSE for landscape mode; applies only to postscript files |
... |
Other arguments for passing to the |
If a file name (file
, without extension) is not
supplied, the format
argument determines how the name is
constructed. With format="name"
, the function name is used.
With format="nn-nn"
and dotsplit
unchanged from the
default, a function name of the form g3.1 leads to the name
03-01
. Here g
can be replaced by any other non-numeric
characters; the result is the same. The relevant extension is in any
case added.
Graphical output to screen, pdf or ps file.
J.H. Maindonald
postscript
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.