ps.latex {sfsmisc} | R Documentation |
Both functions start a ``Pseudo PostScript Preview'' device, using
postscript
, and further registering the file name for
subsequent calls to ps.end
.
ps.do(file, width=-1, height=-1, onefile=FALSE, horizontal=FALSE, title = NULL, ...) ps.latex(file, height = 5 + main.space * 1.25, width = 9.5, main.space=FALSE, lab.space = main.space, paper = "special", title = NULL, lab=c(10, 10, 7), mgp.lab=c(1.6, 0.7, 0), mar=c(4, 4, 0.9, 1.1), ...)
file |
character giving the PostScript file name to be written. |
height |
device height in inches, height * 2.54 are
cm. The default is 5 plus 1.25 iff main.space . |
width |
device width in inches; for this and
height , see postscript . |
onefile, horizontal |
logicals passed to
postscript(..) , most probably to be left alone. |
title |
PostScript (not plot!) title passed to
postscript() ; by default use a title with R version
and file in it. |
main.space |
logical; if true, leave space for a main title (unusual for LaTeX figures!). |
lab.space |
logical; if true, leave space for x- and y- labels
(by not subtracting from mar ). |
paper |
character, see postscript . Only if this is
"special" are your choices of width and height
completely honored (and this may lead to files that can't print on
A4) with resizing. |
lab |
integer of length 3, lab[1:2] are desired number of
tick marks on x- and y- axis, see par(lab=) . |
mgp.lab |
three decreasing numbers determining space for axis
labeling, see par(mgp=) , the default is here smaller
than usual. |
mar |
four numbers, indicating marginal space, see
par(mar=) , the default is here smaller than usual. |
... |
arguments passed to ps.do() from
ps.latex |
and to ps.options
from ps.do
.
ps.latex
has an additional LaTeX flavor, and just differs by
some extra par
settings: After ps.do(..)
is called, the graphical parameters c("mar", "mgp", "lab")
are
reset (to values that typically are better than the defaults for LaTeX
figures).
A list with components
old.par |
containing the old par values |
new.par |
containing the newly set par values |
Martin Maechler
ps.end
, postscript
,
dev.print
.
if(interactive()) { ps.latex("ps.latex-ex.ps", main= TRUE) data(sunspots) plot(sunspots,main=paste("Sunspots Data, n=",length(sunspots)),col="red") ps.end() ps.do("ps_do_ex.ps") example(plot.function) ps.end() }