Setting Graphics Options

To specify values for graphics options, you can submit a GOPTIONS statement. Graphics options control characteristics of the graph, such as size, colors, type fonts, fill patterns, and symbols. In addition, they affect the settings of device parameters, which are defined in the device entry. Device parameters control such characteristics as the appearance of the display, the type of output produced, and the destination of the output.

The GOPTIONS statement allows you to change these settings temporarily, either for a single graph or for the duration of your SAS session. You can use the GOPTIONS statement to

  • override default values for graphics options that control either graphics attributes or device parameters for a single graph or for an entire SAS session
  • reset individual graphics options or all graphics options to their default values
  • cancel definitions for AXIS, FOOTNOTE, PATTERN, SYMBOL, and TITLE statements.

Graphics options remain in effect until you change them, reset them using the RESET= option, or end your SAS session.


General form, GOPTIONS statement:
GOPTIONS <options-list>;

where options-list can be one or more graphics options.

Note: With the exception of RESET=, graphics options can be listed in any order in a GOPTIONS statement. RESET= should be the first option in the GOPTIONS statement.


For example, this GOPTIONS statement sets the values for background color, text height, and text font:
    goptions cback=blue htext=6 pct ftext=zapf;;

This GOPTIONS statement resets all graphic options to their default values:

     goptions reset=goptions;



Graphic Options

Graphic options can be one or more options from any or all of the following categories:


Reset option
RESET=ALL | GLOBAL | statement-name | (statement-name(s))


Options that affect the appearance of the display area and the graphics output
ASPECT=scaling-factor
AUTOSIZE=ON | OFF | DEFAULT
BORDER | NOBORDER
CELL | NOCELL
GSIZE=lines
HORIGIN=horizontal-offset <IN | CM>
HPOS=columns
HSIZE=horizontal-size <IN | CM>
ROTATE=LANDSCAPE | PORTRAIT
ROTATE | NOROTATE
SWAP | NOSWAP
TARGETDEVICE=target-device-entry
VORIGIN=vertical-offset <IN | CM>
VPOS=rows
VSIZE=vertical-size <IN | CM>
XMAX=width <IN | CM>
XPIXELS=width-in-pixels
YMAX=height <IN | CM>
YPIXELS=height-in-pixels


Options that affect color
CBACK=background-color
CBY=BY-line-color
COLORS=<(colors-list | NONE)>
CPATTERN=pattern-color
CSYMBOL=symbol-color
CTEXT=text-color
CTITLE=title-color
PENMOUNTS=active-pen-mounts
PENSORT | NOPENSORT


Options that control font selection or text appearance
CHARTYPE=hardware-font-chartype
FASTTEXT | NOFASTTEXT
FBY=BY-line-font
FCACHE=number-fonts-open
FONTRES=NORMAL | PRESENTATION
FTEXT=text-font
FTITLE=title-font
FTRACK=LOOSE | NONE | NORMAL | TIGHT | TOUCH | V5
HBY=BY-line-height <units>
HTEXT=text-height <units>
HTITLE=title-height <units>
RENDER=APPEND | DISK | MEMORY | NONE | READ
RENDERLIB=libref
SIMFONT=software-font


Options that set defaults for procedures and global statements
GUNIT=units
INTERPOL=interpolation-method
OFFSHADOW=(x <units>, y <units> | (x,y) <units>
V6COMP | NOV6COMP


Image animation options
DELAY=delay-time
DISPOSAL=NONE | BACKGROUND | PREVIOUS | UNSPECIFIED
INTERLACED | NONINTERLACED
ITERATION=iteration-count
TRANSPARENCY | NOTRANSPARENCY


Options that affect how your SAS/GRAPH program runs
DISPLAY | NODISPLAY
ERASE | NOERASE
GWAIT=seconds
GRAPHRC | NOGRAPHRC
PCLIP | NOPCLIP
POLYGONCLIP | NOPOLYGONCLIP


Options that control how output is sent to devices or files
ADMGDF | NOADMGDF
DEVADDR=device-address
DEVICE=device-entry
DEVMAP=device-map-name | NONE
EXTENSION='file-type'
FILECLOSE=DRIVERTERM | GRAPHEND
FILEONLY | NOFILEONLY
GACCESS=output-format | 'output-format > destination'
GEND='string' <...'string-n'>
GEPILOG='string' <...'string-n'>
GOUTMODE=APPEND | REPLACE
GPROLOG='string' <...'string-n'>
GPROTOCOL=module-name
GSFLEN=record-length
GSFMODE=APPEND | PORT | REPLACE
GSFNAME=fileref
GSFPROMPT | NOGSFPROMPT
GSTART='string' <...'string-n'>
HANDSHAKE=HARDWARE | NONE | SOFTWARE | XONXOFF
KEYMAP=map-name | NONE
POSTGEPILOG='string'
POSTGPROLOG='string'
PREGEPILOG='string'
PREGPROLOG='string'
PROMPTCHARS='prompt-chars-hex-string'X


Options that specify hardware capabilities of the device
CHARACTERS | NOCHARACTERS
CIRCLEARC | NOCIRCLEARC
DASH | NODASH
DASHSCALE=scaling-factor
FILL | NOFILL
FILLINC=0...9999
LFACTOR=line-thickness-factor
PIEFILL | NOPIEFILL
POLYGONFILL | NOPOLYGONFILL
SYMBOL | NOSYMBOL


Options that control printer hardware features
AUTOCOPY | NOAUTOCOPY
AUTOFEED | NOAUTOFEED
BINDING=DEFAULTEDGE | LONGEDGE | SHORTEDGE
COLLATE | NOCOLLATE
DUPLEX | NODUPLEX
GCOPIES=(<current-copies><,max-copies>)
PAPERDEST=bin
PAPERFEED=feed-increment <IN | CM>
PAPERLIMIT=width <IN | CM>
PAPERSIZE='size-name' | (width,height)
PAPERSOURCE=tray
PAPERTYPE='type-name'
PPDFILE=fileref | 'external-file'
REPAINT=redraw-factor
REVERSE | NOREVERSE
SPEED=pen-speed
UCC='control-characters-hex-string'X


Options that interact with the operating environment
DRVINIT='system-command(s)'
DRVTERM='system-command(s)'
PREGRAPH='system-command(s)'
POSTGRAPH='system-command(s)'
PROMPT | NOPROMPT


Options for mainframe systems
GCLASS=SYSOUT-class
GDDMCOPY=FSCOPY | GSCOPY
GDDMNICKNAME=nickname
GDDMTOKEN=token
GDEST=destination
GFORMS='forms-code'
GWRITER='writer-name'
TRANTAB=table | user-defined-table







Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement