Chapter Contents |
Previous |
Next |
SAS/GRAPH Software: Reference |
Summary of Use |
To generate graphics output using DSGI, you generally follow these steps:
Note:
The DISPLAY graphics option must be in effect
for the
graphics output to be displayed. See Graphics Options and Device Parameters Dictionary for more information about the DISPLAY
graphics option.
Producing and Storing DSGI Graphs |
By default, DSGI uses the name DSGI if you have not specified a name with the GRAPH('CLEAR', . . . ) function. By default, the catalog entry is stored in WORK.GSEG unless you specify another catalog with the GSET('CATALOG', . . . ) function.
If you generate another graph using a name that matches an existing catalog entry in the current catalog, DSGI uses the default naming conventions for the catalog entry. See Names and Descriptions of Catalog Entries for a description of the conventions used to name catalog entries.
You can redisplay DSGI graphics output stored in catalog entries using the GREPLAY procedure or the GRAPH window.
Structure of DSGI Data Sets |
Using SAS/GRAPH Global Statements with DSGI |
FOOTNOTE and TITLE statements affect DSGI graphics output the same way as they affect other SAS/GRAPH procedure output. When TITLE and FOOTNOTE statements are used, the output from DSGI statements is placed in the procedure output area. See Placement of Graphic Elements in the Graphics Output Area for an explanation of how space in graphics output is allocated to titles and footnotes.
Some DSGI functions override the graphics options. The following table lists the DSGI functions that directly override graphics options. For details about the graphics options, see Graphics Options and Device Parameters Dictionary.
DSGI Function | Graphics Option That Is Overridden | |
---|---|---|
GSET('CBACK', . . . ) | CBACK= | |
GSET('COLREP', . . . ) | COLORS= | |
GSET('DEVICE', . . . ) | DEVICE= | |
GSET('HPOS', . . . ) | HPOS= | |
GSET('HSIZE', . . . ) | HSIZE= | |
GSET('VPOS', . . . ) | VPOS= | |
GSET('VSIZE', . . . ) | VSIZE= | |
GSET('TEXCOLOR', . . . ) | CTEXT= | |
GSET('TEXFONT', . . . ) | FTEXT= | |
GSET('TEXHEIGHT', . . . ) | HTEXT= |
Operating States |
The operating state of DSGI determines which functions and routines may be issued at any point in the DATA step. You can only submit a function or routine when the operating state is appropriate for it. See How Operating States Control the Order of DSGI Statements for a discussion of how functions and routines should be ordered within the operating states.
The operating states defined by DSGI are
GKCL | facility closed, the initial state of DSGI. No graphical resources have been allocated. |
GKOP | facility open. When DSGI is open, you may check the settings of the attributes. |
SGOP | segment open. At this point, graphics output primitives may be generated. |
WSAC | workstation active. When the workstation is active, it can receive DSGI statements. |
WSOP | workstation open. In this implementation, the graphics catalog, either the default or the one specified through the GSET('CATALOG', . . . ) command, is opened or created. |
Refer to individual functions and routines in DATA Step Graphics Interface Dictionary for the operating states from which that function or routine can be issued.
The Current Window System |
You can define the x and y ranges to be any numeric range. For example, you can use - 1000 to +2000 on the x axis and 30 to 35 on the y axis. The units used are arbitrary.
Debugging DSGI Programs |
When DSGI encounters an error in a program, it flags the statement in the SAS log and displays a description of the error. (To receive SAS System messages, GSET('MESSAGE', . . . ) must be ON.) The description provides you with an explanation of the error. The description may also provide a return code. If you get a return code, you can refer to Return Codes for DSGI Routines and Functions for a description of the error and why it might have occurred.
Some of the most common errors in DSGI programs are
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.