Rev 3475 | Blame | Last modification | View Log | Download | RSS feed
\name{postscript}\title{PostScript Graphics}\usage{postscript(file = "Rplots.ps", \dots)% paper, horizontal, width, height, family, pointsize, bg, fg)ps.options(\dots, reset = FALSE, override.check = FALSE)% (paper, horizontal, width, height, family, pointsize, bg, fg,% onefile = TRUE, print.it = FALSE, append = FALSE,.PostScript.Options}\alias{postscript}\alias{ps.options}\alias{.PostScript.Options}\arguments{\item{file}{a character string giving the name of the file to print to.}\item{\dots}{further options for \code{postscript()}.}\item{paper}{the size of paper in the printer. The choices are\code{"a4"}, \code{"letter"}, \code{"legal"} and \code{"executive"}.}\item{horizontal}{the orientation of the printed image, a logical.}\item{width,height}{the width, and height of the graphics region in inches.The default is to use the entire page.}\item{family}{the font family to be used.This must be one of \code{"AvantGarde"},\code{"Bookman"}, \code{"Courier"}, \code{"Helvetica"},\code{"Helvetica-Narrow"}, \code{"NewCenturySchoolbook"},\code{"Palatino"} or \code{"Times"}.}\item{pointsize}{the default point size to be used.}\item{bg}{the default background color to be used.}\item{fg}{the default foreground color to be used.}\item{onefile, print.it, append}{logical; are currently \bold{alldisregarded}; just there for compatibility reasons.}}%%>>> REAL DOC in SOURCE: ../../../main/devices.c & ../../../unix/devPS.c\description{\code{postscript} starts the graphics device driver for producingPostScript graphics.The auxiliary function \code{ps.options} can be used to set and view(if called without arguments)default values for the arguments to \code{postscript}.}\details{\code{postscript(..)} opens the file \code{file} and thePostScript commands needed to plot any graphics requested arestored in that file.This file can then be printed on a suitable device to obtain hard copy.The postscript produced by \R is EPS (\emph{Encapsulated PostScript})compatible, and can be included into other documents, e.g. into LaTeX, using\code{\epsfig{file=<filename>}}.}\seealso{\code{\link{x11}}, \code{\link{macintosh}}, \code{\link{Devices}}.{\code{\link{check.options}} which is called from both\code{ps.options} and \code{postscript}.}}\examples{\dontrun{# open the file "foo.ps" for graphics outputpostscript("foo.ps")}\testonly{xx <- seq(0, 7, length=701)yy <- sin(xx)/xx; yy[1] <- 1plot(xx,yy) # produce the desired graph(s)}\dontrun{dev.off() # turn off the postscript device}all(unlist(ps.options()) == unlist(.PostScript.Options))ps.options(bg = "pink")str(ps.options(reset = TRUE))##- error checking of arguments:ps.options(width=0:12, onefile=0, bg=pi)## override the check for 'onefile', but not the others:str(ps.options(width=0:12, onefile=1, bg=pi, override.check = c(F,T,F)))}\keyword{device}