Goptions Statement

Contents Index


The goptions statement controls most of the HARDWARE features associated with high quality plotting/graphing done using proc gplot.

Frequently used settings should be placed in a goptions statement appearing in your autoexec.sas file. The goptions statement can be used in the program editor window. The goptions statement should not be used inside a proc or data step.

Here is a basic goptions statement that will serve most needs of Microsoft Windows users. This example sets things up for black on white printing.

goptions
	device=win
	targetdevice=winprtm
	cback=white
	colors=(black)
	ftext=swiss
	interpol=join;

The cback option sets the background color (to white here).

The colors option selects the possible foreground colors, here black only. The back and colors options here should make the appearance of graphs on screen look as much as possible like their printed counterparts. If you have a color printer, you may wish to allow more colorful graphs on screen as well as in print.

The targetdevice specifies hardware driver for printed output. There are many options available here. The one selected uses the standard Microsoft Windows driver.

The ftext option specifies the font to use for text on the graph/plot. Many options are available.

The interpol= option specifies the default type of interpolation to be used to connect the dots of the graph. Most common is interpol=join in which data points are joined by straight lines. Other common options here are interpol=needle for needle graphs, and interpol= for no joining of data points. The setting specified here can be overridden in the actual plot procedure.

A more complicated setup may be required when using SUN workstations. Here is a prototype:

filename sparc pipe 'lpr -Psparc';
goptions device=xcolor
	target=ps
	rotate=landscape
	cback=white
	colors=(black)
	interpol=join        
	gsfname=sparc
	gsfmode=replace
	gaccess=sasgaedt
	gsflen=80
	noprompt
	gprolog='25210D0A'x;

The rotate option is used to produce landscape style output. This option is not implemented for all printers and may cause unpredictable results on others.

For additional information see the SAS/GRAPH User's Guide.


Contents Index

Copyright © 1997 by Jerry Alan Veeh. All rights reserved.