WHEN Variable

Specifies when the function is performed in relation to generating other graphics output for the procedure or in relation to generating other Annotate graphics.

Type:character
Length:1
Default:B

Syntax

WHEN='B' | 'A';

Variable Values

B

draws the annotation before the graph is drawn.

NotesA missing value is equivalent to specifying B.
The frame of some plot types is drawn before the annotations when WHEN="B". If you use the Annotate facility to draw a background and you want your graph frame to be visible, then you can use the BAR function to draw a frame. The following annotate statements draw a white graph frame:
xsys="3"; ysys="3"; when="b";
function="move"; x=0; y=0; output;
function="bar"; style="solid"; color="white"; x=100; y=100; output;

A

draws the annotation after the graph is drawn.

TipTo prevent your graph from occluding your annotations, specify WHEN="A". This is particularly important for interactive presentations, where the back wall of the graph might be made visible by default.

Details

The WHEN Variable and Annotate Data Set Processing

Normally, observations in an Annotate data set are processed sequentially. If you use the WHEN variable, all those observations with a WHEN value of B are processed first. The procedure output is then processed (if one is to be produced), and finally the observations with a WHEN value of A are processed.

Functions

You can use the WHEN variable with these functions:

BARMOVEPOLY
DRAWPIEPOLYCONT
DRAW2TXTPIECNTRSYMBOL
FRAMEPIEXY
LABELPOINT
Last updated: January 17, 2025