Chapter Contents |
Previous |
Next |
SAS/GRAPH Software: Reference |
Order in Which Graphics Elements Are Drawn |
The WHEN variable determines the order in which observations in an Annotate data set are processed. It determines if observations are processed before or after other observations and before or after output that is produced by a SAS/GRAPH procedure. This means that Annotate graphics can be overlaid by procedure output or can overlay procedure output. By default, Annotate graphics are drawn before the procedure output.
In effect, you can have two sets of Annotate graphics elements that are generated for the same output:
Within each set, graphics elements are drawn in the order that they appear in the Annotate data set and overlay each other as appropriate (on devices that demonstrate overlay behavior). For details, see the description of the WHEN variable on WHEN Variable.
Using BY-Group Processing with the Annotate Facility |
See BY Statement for details.
Using the LIFO Stack |
The LIFO (last-in-first-out) stack is a storage area where you can keep internal coordinate values for later use. It is useful when you want to save the current values of (XLAST,YLAST) and (XLSTT,YLSTT) and use them with functions later in the DATA step.
You store and retrieve values from the stack using the PUSH and POP functions. The PUSH function copies the current values of XLAST, YLAST, XLSTT, and YLSTT onto the stack. The POP function copies values from the stack into XLAST, YLAST, XLSTT, and YLSTT.
LIFO stacks manage the stored data so that the last data stored in the stack is the first data removed from the stack. This means that a POP function retrieves the values most recently stored with a PUSH function. Using PUSH and POP to Store and Retrieve Coordinate Values illustrates how PUSH and POP functions work together.
Using PUSH and POP to Store and Retrieve Coordinate Values
See also Internal Coordinates.
Debugging |
You can print your Annotate data set with the PRINT procedure. This is an easy way to examine the Annotation that you have specified or to debug your program. For example, a listing such as the one in Listing of the Annotate Data Set TRIANGLE provides complete information about the value that you specify for each variable in every observation.
For more complex problems, the DEBUG function enables you to display the values of Annotate variables and internal coordinates before and after a function is submitted. The values are written to the SAS log.
If there is an error in your Annotate data set, one or more diagnostic messages are printed in the SAS log:
NOTE: ERROR DETECTED IN ANNOTATE= libref.dataset
PROBLEM IN OBSERVATION number-message
where message is the text of the error message.
ERROR LIMIT REACHED IN ANNOTATE PROCESS 20 TOTAL ERRORS
For an explanation of common diagnostic messages, refer to the Help facility.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.