gdispla Device-independent DISPLAY control gdispla

SAS Macro Programs: gdispla

$Version: 1.0 (17 Apr 2003)
Michael Friendly
York University

The gdispla macro ( [download] get gdispla.sas)

Device-independent DISPLAY control

The GDISPLA macro is used to switch graphics display off or on, in a device-independent way.

It allows for the fact that for direct output to the display device, the required GOPTIONS are NODISPLAY or DISPLAY, whereas for output to a GSF, GIF, or EPS file, the options are GSFMODE=NONE or GSFMODE=APPEND. It is usually used with the panels macro or the SCATMAT macro, or other programs which produce multiple plots and then join those plots in a template using PROC GREPLAY.

Usage

The GDISPLA macro is called with positional parameters. The first (SWITCH) parameter must be specified. The second parameter is only used within SAS/IML.

Parameters

SWITCH
A string value, OFF or ON. The value OFF suspends graphic display or the production of graphic output files; graphics are still stored in the graphics catalog. The value ON resumes display for any subsequent graphics procedures.
IML
Specify any non-blank value to use the GDISPLA macro within SAS/IML.

Global parameters

The macro uses one global macro parameter, DEVTYP, to determine the appropriate action. This parameter is normally initialized either in the AUTOEXEC.SAS file, or in device-specific macros. For example, a macro to initialize EPS output should set the macro variable DEVTYP=EPS, using
 %let devtype=eps;
DEVTYP
String value, the type of graphic device driver. The values EPS, GIF, CGM and WMF cause the macro to use the GSMODE option; the value DEVTYPE=SCREEN causes the macro to use the DISPLAY or NODISPLAY option. All other values are ignored.

Example

The following example plots a series of graphs without displaying them individually. All graphs are then shown in a single multi-panel display.
  %let devtype=SCREEN;
  %gdispla(OFF);
  proc gplot;
     plot y * x;
     by group;
  %gdispla(ON);
  %panels(rows=1, cols=3);

See also

gskip
panels
scatmat