gskip Device-independent macro for multiple plots gskip

Visualizing Categorical Data: gskip

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

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

Device-independent macro for multiple plots

The GSKIP macro is designed to handle difficulties in producing multiple plots in one SAS job. For EPS, GIF, CGM and WMF drivers, it assigns a new output filename for the next plot. For FOILS (on continuous forms) it skips the normally blank non-foil separator page. Otherwise, it has no effect.

Usage

The GSKIP macro has one optional positional parameter. It relies on global macro parameters, DISPLAY, DEVTYP, FIG, GSASFILE, and GSASDIR. These parameters are normally initialized either in the AUTOEXEC.SAS file, or in device-specific macros. For example, for normal graphic output to the Graph Window, assign DISPLAY and DEVTYPE as
  %let devtype=SCREEN;
  %let displa=ON;

For EPS file output,

  %let devtype=EPS;
  %let fig=1;
  %let gsasfile=myfig;

GSKIP is normally used after each graphic procedure or macro to advance the FIG counter and open a new graphic output file. For example,

  proc gplot;
     plot y * x;
  %gskip();

Parameters

INC
The value by which the FIG counter is incremented, normally 1 (the default). Use the INC parameter after a plot with a BY statement. For example,
  proc gplot;
     plot y * x; by sex;
  %gskip(2);


Global Parameters

DISPLAY
String value, ON or OFF, usually set by the GDISPLA macro. The GISKP macro takes no action if DISPLAY=OFF.
DEVTYP
String value, the type of graphic device driver. The values EPS, GIF, CGM and WMF cause FIG= to be incremented and a new output filename assigned. If DEVTYPE=FOILS, a blank graphic page is produced. All others are ignored.
FIG
A numeric value, the number of the current figure.
GSASFILE
String value, the basename of the graphic output file(s). The output files are named according to the macro expression
     %scan(&gsasfile,1,.)&fig..%lowcase(&devtyp)

e.g., myfile1.eps, myfile2.eps, ....

GSASDIR
String value, the output directory in which the graphic files are written. If not specified, output goes to the current directory.

See also

gdispla Device-independent DISPLAY/NODISPLAY control