| Line 15... |
Line 15... |
| 15 |
\synopsis{
|
15 |
\synopsis{
|
| 16 |
postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
|
16 |
postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
|
| 17 |
onefile = TRUE, family, \dots)
|
17 |
onefile = TRUE, family, \dots)
|
| 18 |
ps.options(\dots, reset = FALSE, override.check = FALSE)
|
18 |
ps.options(\dots, reset = FALSE, override.check = FALSE)
|
| 19 |
}
|
19 |
}
|
| - |
|
20 |
%% The definitive doc is the source :-)
|
| - |
|
21 |
%% ../../../main/devices.c & ../../../unix/devPS.c
|
| 20 |
\usage{
|
22 |
\usage{
|
| 21 |
postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
|
23 |
postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
|
| 22 |
onefile = TRUE,
|
24 |
onefile = TRUE,
|
| 23 |
paper, family, encoding, bg, fg,
|
25 |
paper, family, encoding, bg, fg,
|
| 24 |
width, height, horizontal, pointsize,
|
26 |
width, height, horizontal, pointsize,
|
| 25 |
pagecentre, print.it, command)
|
27 |
pagecentre, print.it, command)
|
| 26 |
|
28 |
|
| 27 |
% paper, horizontal, width, height, family, pointsize, bg, fg)
|
29 |
% paper, horizontal, width, height, family, pointsize, bg, fg)
|
| 28 |
ps.options(paper, horizontal, width, height, family, encoding,
|
30 |
ps.options(paper, horizontal, width, height, family, encoding,
|
| 29 |
pointsize, bg, fg,
|
31 |
pointsize, bg, fg,
|
| 30 |
onefile = TRUE, print.it = FALSE, append = FALSE,
|
32 |
onefile = TRUE, print.it = FALSE, append = FALSE,
|
| 31 |
reset = FALSE, override.check = FALSE)
|
33 |
reset = FALSE, override.check = FALSE)
|
| 32 |
.PostScript.Options
|
34 |
.PostScript.Options
|
| 33 |
}
|
35 |
}
|
| 34 |
%% The definitive doc is the source :-)
|
- |
|
| 35 |
%% ../../../main/devices.c & ../../../unix/devPS.c
|
- |
|
| 36 |
\description{
|
- |
|
| 37 |
\code{postscript} starts the graphics device driver for producing
|
- |
|
| 38 |
PostScript graphics.
|
- |
|
| 39 |
|
- |
|
| 40 |
The auxiliary function \code{ps.options} can be used to set and view
|
- |
|
| 41 |
(if called without arguments)
|
- |
|
| 42 |
default values for the arguments to \code{postscript}. It needs to be
|
- |
|
| 43 |
called before calling \code{postscript}, and the default values it
|
- |
|
| 44 |
sets can be overridden by supplying arguments to \code{postscript}.
|
- |
|
| 45 |
}
|
- |
|
| 46 |
\arguments{
|
36 |
\arguments{
|
| 47 |
\item{file}{a character string giving the name of the file. If it is
|
37 |
\item{file}{a character string giving the name of the file. If it is
|
| 48 |
\code{""}, the output is piped to the command given by
|
38 |
\code{""}, the output is piped to the command given by
|
| 49 |
the argument \code{command}.
|
39 |
the argument \code{command}.
|
| 50 |
#ifdef unix
|
40 |
#ifdef unix
|
| Line 53... |
Line 43... |
| 53 |
#endif
|
43 |
#endif
|
| 54 |
|
44 |
|
| 55 |
For use with \code{onefile=FALSE} give a \code{printf} format such
|
45 |
For use with \code{onefile=FALSE} give a \code{printf} format such
|
| 56 |
as \code{"Rplot\%d.ps"} (the default in that case).
|
46 |
as \code{"Rplot\%d.ps"} (the default in that case).
|
| 57 |
}
|
47 |
}
|
| 58 |
\item{\dots}{further options for \code{postscript()} :}
|
48 |
\item{\dots}{further options for \code{postscript()}.}
|
| 59 |
\item{paper}{the size of paper in the printer. The choices are
|
49 |
\item{paper}{the size of paper in the printer. The choices are
|
| 60 |
\code{"a4"}, \code{"letter"}, \code{"legal"} and
|
50 |
\code{"a4"}, \code{"letter"}, \code{"legal"} and
|
| 61 |
\code{"executive"} (and these can be capitalized).
|
51 |
\code{"executive"} (and these can be capitalized).
|
| 62 |
Also, \code{"special"} can be used, when the \code{width}
|
52 |
Also, \code{"special"} can be used, when the \code{width}
|
| 63 |
and \code{height} specify the paper size. A further choice is
|
53 |
and \code{height} specify the paper size. A further choice is
|
| 64 |
\code{"default"}, which is the default. If this is selected, the
|
54 |
\code{"default"}, which is the default. If this is selected, the
|
| 65 |
papersize is taken from the option \code{"papersize"}
|
55 |
papersize is taken from the option \code{"papersize"}
|
| 66 |
if that is set and to \code{"a4"} if it is unset or empty.}
|
56 |
if that is set and to \code{"a4"} if it is unset or empty.}
|
| 67 |
\item{horizontal}{the orientation of the printed image, a
|
57 |
\item{horizontal}{the orientation of the printed image, a
|
| 68 |
logical. Defaults to true, that is landscape orientation.}
|
58 |
logical. Defaults to true, that is landscape orientation.}
|
| 69 |
\item{width, height}{the width and height of the graphics region in inches.
|
59 |
\item{width, height}{the width and height of the graphics region in
|
| 70 |
The default is to use the entire page less a 0.25 inch border on
|
60 |
inches. The default is to use the entire page less a 0.25 inch
|
| 71 |
each side.}
|
61 |
border on each side.}
|
| 72 |
\item{family}{the font family to be used. EITHER a single character string
|
62 |
\item{family}{the font family to be used. EITHER a single character
|
| 73 |
which must be one of \code{"AvantGarde"},
|
63 |
string which must be one of \code{"AvantGarde"},
|
| 74 |
\code{"Bookman"}, \code{"Courier"}, \code{"Helvetica"},
|
64 |
\code{"Bookman"}, \code{"Courier"}, \code{"Helvetica"},
|
| 75 |
\code{"Helvetica-Narrow"}, \code{"NewCenturySchoolbook"},
|
65 |
\code{"Helvetica-Narrow"}, \code{"NewCenturySchoolbook"},
|
| 76 |
\code{"Palatino"} or \code{"Times"}, OR a character vector of length
|
66 |
\code{"Palatino"} or \code{"Times"}, OR a character vector of length
|
| 77 |
four. }
|
67 |
four.}
|
| 78 |
\item{encoding}{the name of an encoding file. Defaults to
|
68 |
\item{encoding}{the name of an encoding file. Defaults to
|
| 79 |
#ifdef unix
|
69 |
#ifdef unix
|
| 80 |
"ISOLatin1.enc"
|
70 |
"ISOLatin1.enc"
|
| 81 |
#endif
|
71 |
#endif
|
| 82 |
#ifdef windows
|
72 |
#ifdef windows
|
| Line 132... |
Line 122... |
| 132 |
\url{http://www.cs.wisc.edu/~ghost/rjl.html}. The command will be run
|
122 |
\url{http://www.cs.wisc.edu/~ghost/rjl.html}. The command will be run
|
| 133 |
in a minimized window.
|
123 |
in a minimized window.
|
| 134 |
#endif
|
124 |
#endif
|
| 135 |
|
125 |
|
| 136 |
The postscript produced by \R is EPS (\emph{Encapsulated PostScript})
|
126 |
The postscript produced by \R is EPS (\emph{Encapsulated PostScript})
|
| 137 |
compatible, and can be included into other documents, e.g. into LaTeX,
|
127 |
compatible, and can be included into other documents, e.g., into
|
| 138 |
using \code{\includegraphics{<filename>}}. For use in this way you will
|
128 |
LaTeX, using \code{\includegraphics{<filename>}}. For use in this way
|
| 139 |
probably want to set \code{horizontal=FALSE, onefile=FALSE, paper="special"}.
|
129 |
you will probably want to set \code{horizontal=FALSE, onefile=FALSE,
|
| - |
|
130 |
paper="special"}.
|
| 140 |
|
131 |
|
| 141 |
Most of the PostScript prologue used is taken from the \R character
|
132 |
Most of the PostScript prologue used is taken from the \R character
|
| 142 |
vector \code{.ps.prolog}. This is marked in the output, and can be
|
133 |
vector \code{.ps.prolog}. This is marked in the output, and can be
|
| 143 |
changed by changing that vector. (This is only advisable for
|
134 |
changed by changing that vector. (This is only advisable for
|
| 144 |
PostScript experts.)
|
135 |
PostScript experts.)
|
| Line 158... |
Line 149... |
| 158 |
including the PostScript plot file should either embed the font
|
149 |
including the PostScript plot file should either embed the font
|
| 159 |
outlines (usually from \code{.pfb} or \code{.pfa} files) or
|
150 |
outlines (usually from \code{.pfb} or \code{.pfa} files) or
|
| 160 |
use DSC comments to instruct the print spooler to do so.
|
151 |
use DSC comments to instruct the print spooler to do so.
|
| 161 |
|
152 |
|
| 162 |
As ISOLatin1 encoding is used, \code{-} is set as a minus and not
|
153 |
As ISOLatin1 encoding is used, \code{-} is set as a minus and not
|
| 163 |
as a hyphen. Supply a hyphen (character 173) if that is what you need.
|
154 |
as a hyphen. Supply a hyphen (character 173) if that is what you
|
| - |
|
155 |
need.
|
| 164 |
|
156 |
|
| - |
|
157 |
\code{ps.options} needs to be called before calling \code{postscript},
|
| - |
|
158 |
and the default values it sets can be overridden by supplying
|
| - |
|
159 |
arguments to \code{postscript}.
|
| 165 |
}
|
160 |
}
|
| 166 |
\section{Encodings}{
|
161 |
\section{Encodings}{
|
| 167 |
Encodings describe which glyphs are used to display the character codes
|
162 |
Encodings describe which glyphs are used to display the character codes
|
| 168 |
(in the range 0--255). By default \R uses ISOLatin1 encoding, and
|
163 |
(in the range 0--255). By default \R uses ISOLatin1 encoding, and
|
| 169 |
the examples for \code{\link{text}} are in that encoding. However,
|
164 |
the examples for \code{\link{text}} are in that encoding. However,
|