Controlling Output with Device Drivers


When a SAS/GRAPH procedure produces output, it first checks to see what device driver you have specified. It then looks in the device entry for that driver to find the current parameter settings. In general, parameter values control

  • the appearance of the graphics output. Device parameters control such aspects as the size of the graphics output, units (such as inches or points) used to draw the output, colors displayed, and text fonts and sizes used.

  • how the operating environment communicates with the device. For example, some devices require the graphics commands to be formatted in a specific way or require a particular communications protocol. Others may require that a set of initialization commands precede the graphics commands.

  • how the output is produced “ that is, how the output is displayed or printed. Some device parameters control the behavior of a hardcopy device, such as the paper feed between graphs as well as the display characteristics, such as orientation.

The parameter values for device entries in SASHELP.DEVICES reflect the most common modes of operation of the supported devices. You can control the way the device driver produces output for your device by changing values in the device entry. You can change device parameters either permanently or temporarily.

Modifying Device Parameters Permanently

To change a device parameter permanently, you must make the change in the device entry itself using the GDEVICE procedure. The modifications made to a device entry are in effect for all SAS sessions.

The new values that you specify for device parameters must be within the device s capabilities. For example, all devices are limited in the size of the output they can display. Some output devices cannot display color . If you try to increase the size of the display past the device s capability or if you specify colors for a device that cannot display them, you will get unpredictable results.

Note: If you run SAS/GRAPH software in a multi- user environment, you should not change the device entries in the Institute-supplied catalog, SASHELP.DEVICES, unless you are the system administrator or the SAS Support Consultant.

If you need to change a device driver in SASHELP.DEVICES, copy it into a personal catalog named DEVICES, and then modify the copy. To use the new device driver, assign the libref GDEVICE0 to the library that contains the modified copy. See Creating or Modifying Device Entries on page 934 for details.

Overriding Device Parameters Temporarily

You can temporarily override the settings of device parameters by using graphics options in a GOPTIONS statement or by specifying options in other SAS/GRAPH statements.

Graphics Options

To override device parameter settings with graphics options, simply submit the options in a GOPTIONS statement. For example, the HSIZE= and VSIZE= graphics options control the default size of the graphics output area and override the values of the HSIZE= and VSIZE= device parameters in the current device entry. The following GOPTIONS statement changes the dimensions of the graphics output area:

 goptions hsize=6in vsize=4in; 

These new values remain in effect until you change them, use the RESET= graphics option to reset them, or end your SAS session.

The values that you specify for graphics options must be supported by your graphics device. If you use an option that is not supported, SAS/GRAPH software ignores the option. See GOPTIONS Statement on page 146 for information about specifying graphics options.

Statement Options

You can also override parameters that control such attributes as text color and font by using options in other SAS/GRAPH statements. For example, this TITLE statement explicitly specifies the text color and font:

 title color=blue font=zapf Production Quality; 

The COLOR= option overrides the default color selection from the device entry s colors list as well as any graphics options that affect text color. The FONT= option overrides the device s default font and any graphics options that affect the font. As long as the values are supported by your graphics device, the values you specify in the statements override the corresponding device parameters and graphics options when the SAS program is executed.

When you specify options that override device parameter settings, this is the order of precedence that SAS/GRAPH software uses:

  1. options in a SAS/GRAPH procedure statement or AXIS, FOOTNOTE, LEGEND, NOTE, PATTERN, SYMBOL, or TITLE statement

  2. graphics options in a GOPTIONS statement

  3. device parameters in a device entry

  4. default hardware settings of a device.




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net