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, ...)
Graphical output to screen, pdf or ps file.
width of plot in inches (sic!)
height of plot in inches (sic!)
(lattice plots only) TRUE if plot is not black on white only
TRUE if plot uses trellis graphics
screen "", pdf or ps
external path name
name of file to hold output, else NULL
Alternatives are "nn-nn"
and "name"
.
character on which to split function name (file=NULL)
Pointsize. For trellis devices a vector of length 2 giving font sizes for text and for points respectively
For postscript devices, specify families that will be used in addition to the intial device
FALSE for landscape mode; applies only to postscript files
Other arguments for passing to the pdf
or
postscript
J.H. Maindonald
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.