.BG
.FN postscript
.TL
Device Driver for PostScript Printers
.CS
postscript(file, command, horizontal=F,
      width, height, rasters, pointsize=14,
      font=1, preamble=ps.preamble,
      fonts=ps.fonts, colors=ps.colors,
      region=ps.region)
.PP
.AG file
character string naming a file.
If this argument is supplied, the
output PostScript program
is written to this file.
.AG command
character string naming a Unix command.
If `file' is not supplied,
the device driver output will be piped through `command.'
The default value of `command' will be installation dependent, and
might reasonably be a call to an appropriate line printer spooler.
.AG horizontal
specifies horizontal (landscape) orientation, default `FALSE'.
.AG width
width of plotting region in inches; defaults to 99% of the width
(height if `horizontal' is `TRUE') of the imageable region of
the printer.
.AG height
height of plotting region in inches; defaults to 99% of the height
(width if `horizontal' is `TRUE') of the imageable region of
the printer.
.AG rasters
number of plotting units per inch.
Default is the typical
laser printer device resolution of 300 units per inch.
.AG pointsize
base size of text, in points (one point = 1/72 inches).
If the graphical parameter `cex' is equal to 1, text will
appear in this size.
.AG font
number giving default font for text (see argument `fonts').
A negative number will select the font in its outline form.
.AG preamble
character object containing the postscript program that defines
the driver.
.AG fonts
character object enumerating the fonts you want available with `postscript'.
Font number `i' will be the `i'-th font named in this vector.
.AG colors
numeric object giving an assignment of colors to color numbers.
There are three possibilites.
If `colors' is a vector, it is
used to define gray levels (0=black to 1=white) beginning with
color number 1.
If `colors' is a 3-column matrix, it is used to define colors
in the HSB model (see the Reference), one per row, beginning
with color number 1.
If `colors' is a 4-column matrix, it is used to define colors
in the HSB model, one per row, with the first number
of a row giving the color number.
Unspecified colors with intermediate color numbers are set to black.
.AG region
numeric vector of length 4 giving the coordinates of the lower left
and upper right corners of the imageable region for the printer,
in default PostScript coordinates.
See the `ps.region' documentation for a way to discover the
imageable region of your printer.
.PP
This function is a device driver that produces a program
in the PostScript\(tm page description language.
By default this program is sent directly to a PostScript laser printer,
via the `command' argument (which will be installation dependent).
When the `file' argument is given, the program is collected
on the named file (and not sent through the `command').
If `file' already exists, it will be overwritten.
.PP
The `postscript' device driver supports variable character sizes,
general string and character rotations and ten line styles.
Line width is specified by the `lwd' parameter, and is interpreted
in units of 1/36 inches, hence the default `lwd=1' line
is 2 points wide.
A line width of 0 gives the thinnest possible line on the device.
Colors may be specified in two ways: `col' between
0 and 1 maps into a range from white to black;
otherwise `col' is truncated to an integer and indexes
a table of colors, which may be given by the `colors' argument.
Fonts that are normally filled (all but the Courier family) may
be outlined by specifying the font as a negative number.
The `pch' graphical parameter will select plotting characters from
the Standard Encoding vector of PostScript (see page 252 of Reference
below).
When plotted these characters are always centered.
Setting `pch="."' gives a plotting dot; `pch=183'
gives a larger plotting dot.
Using `pch=183' with a negative `font' parameter gives a plotting circle.
.SH REFERENCE
Adobe Systems, Inc.,
.ul
PostScript Language Reference Manual,
Addison-Wesley, Reading, Massachusetts, 1985.
.SA
`ps.fonts' and `ps.preamble' in Appendix 2.
.EX
postscript()	# send output directly to device
postscript("figure1.ps", font=-3)
	# save output on a file; text in outlined Times-Roman
.KW device
.WR

