[ top | up ]

PostScript Graphics

Syntax

postscript(file="Rplots.ps", paper="a4", landscape=TRUE,
        width, height, family="Helvetica", pointsize=12,
        bg="white", fg="black")

Arguments

file the name of a file to print to, it must be a quoted string.
paper the size of paper in the printer. The choices are "a4", "letter", "legal" and "executive".
landscape the orientation of the printed image, a logical.
width,height the width, and height of the graphics region in inches. The default is to use the entire page.
family the font family to be used. This must be one of "AvantGarde", "Bookman", "Courier", "Helvetica", "Helvetica-Narrow", "NewCenturySchoolbook", "Palatino" or "Times".
pointsize the default point size to be used.
bg the default background color to be used.
bg the default foreground color to be used.

Description

The file file is opened and the PostScript commands needed to plot any graphics requested are stored in that file. This file can then be printed on a suitable device to obtain hard copy.

See Also

x11, macintosh, device.

Examples

# open the file "foo" for graphics output postscript("foo") # produce the desired graph(s) plot(x,y)