gdispla Device-independent DISPLAY/NODISPLAY control gdispla

Visualizing Categorical Data: gdispla

$Version: 1.0 (04 Jan 1999)
Michael Friendly
York University

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

Device-independent DISPLAY/NODISPLAY 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 other programs which produce multiple plots and then join those plots in a template using PROC GREPLAY. Some multi-plot programs use the GDISPLA macro internally.

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.
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

%include vcd(gdispla);        *-- or include in an autocall library;
%let devtype=SCREEN;

  %gdispla(OFF);
  proc gplot;
     plot y * x;
     by group;
  %gdispla(ON);
  %panels(rows=1, cols=3);

See also

panels
scatmat