SAS Institute. The Power to Know

SAS/GRAPH(R) 9.2: Reference

Previous Page | Next Page

Using Graphics Devices

Overriding the Default Device

You can override the default device in a SAS session in the following ways:

  • Specify the name of a device entry with the DEVICE= option in a GOPTIONS statement. For example:

    goptions device=gif;
    For details, see GOPTIONS Statement.
  • Specify the name of a device entry with the DEVICE= option in an OPTIONS statement. For details, see DEVICE= System Option in SAS Language Reference: Dictionary.

  • Enter OPTIONS on the SAS command line, or select Tools [arrow] Options [arrow] System to open the SAS System Options window. Expand Graphics, and select Driver settings. Right-click on Device, select Modify value, and specify the name of the graphics device that you want to use.

  • Enter the device name in the DEVICE prompt window. The DEVICE prompt window opens automatically if you submit a SAS/GRAPH program that produces graphics output, no device has been specified, and you are running outside of the SAS windowing system environment.

If you specify a device in more than one way, the last specification that SAS/GRAPH encounters is the one that it uses. The device specification stays in effect until you specify another device, submit the graphics option RESET=GOPTIONS or RESET=ALL, or end your SAS session.

If you use the same device for most or all of your SAS/GRAPH programs, you can put the GOPTIONS DEVICE= statement in an AUTOEXEC file. See the SAS companion for your operating environment for details on setting up an AUTOEXEC file.

You can also specify a device for previewing or printing your output with the TARGETDEVICE= graphics option. For details, see Printing Your Graph.

If you submit a SAS procedure without specifying a device and your display device does not support the GRAPH window or you are running outside the SAS windowing system, then SAS/GRAPH prompts you for a device.

Previous Page | Next Page | Top of Page