Annotate Macros


You can use Annotate macros within a SAS DATA step to simplify the process of creating Annotate observations. With a macro, you specify a function and assign variable values in one step without having to write explicit variable assignment statements. You can mix assignment statements and macro calls in the same DATA step.

This section describes all of the Annotate macros including the complete syntax and a description of the parameters. For more information on accessing and using macros, and for a summary of operations performed by the Annotate macros, see Using Annotate Macros on page 697.

%ANNOMAC Macro

Compiles Annotate macros and makes them available for use.

Variables written out: none directly

Syntax

%ANNOMAC;

Details

In a SAS session, you must submit the ANNOMAC macro before you can use the Annotate macros.

%BAR, %BAR2 Macros

Draws a rectangle using two sets of x/y coordinates, which specify diagonal corners. You can specify the rectangle s line type, line color, fill type, and fill color .

Variables written out: COLOR, FUNCTION, LINE, STYLE, X, Y

Internal variables updated: XLAST, YLAST

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%BAR ( x1 , y1 , x2 , y2 , color , line , style );

%BAR2 ( x1 , y1 , x2 , y2 , color , line , style , width );

x1 , y1

  • specify the location of the first corner of the bar. Values can be numeric coordinates, numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667.

x2 , y2

  • specify the location of second corner of the bar, which is drawn diagonal to the first corner. Values can be numeric coordinates, numeric constants, or numeric variables.

color

  • specifies the outline color and optional fill color using a character string without quotation marks. For details, see the Annotate COLOR Variable on page 645.

line

  • specifies which of the outlines of the bar are to be drawn. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate LINE Variable on page 652 for the BAR function.

style

  • specifies the fill pattern for the bar using a character string without quotation marks. For valid values, see the Annotate STYLE Variable (Patterns) on page 662 for the BAR function.

width

  • specifies the width of the outline and optional fill lines. The value can a number, a numeric constant, or a numeric variable. For details and valid values, see the Annotate SIZE Variable on page 660 for the DRAW function.

%CENTROID Macro

Retrieves the centroids of polygons

Variables written out: X, Y, id variables

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%CENTROID ( input-data-set , output-data-set , list-of-id-variables );

input-data-set

  • specifies a map data set.

output-data-set

  • contains the id variables and the X and Y variables.

list-of-id-variables

  • specifies the variables each of which is to be assigned the centroid coordinates of each observation in the input-data-set. There will be one observation for each unique set of ID values

%CIRCLE Macro

Draws an empty circle with the center at ( x , y ).

Variables written out: ANGLE, FUNCTION, ROTATE, SIZE, STYLE, X, Y

Internal variables updated: XLAST, YLAST

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%CIRCLE ( x , y , size , color );

x , y

  • specify coordinates for the center of the circle. Values can be coordinate numbers , numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667.

size

  • specifies the radius of the circle. The value can be a number, a numeric constant, or a numeric variable. For details and valid values, see the Annotate SIZE Variable on page 660.

color

  • specifies the color of the circle using a character string without quotation marks. For details, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter.

See Also

  • %SLICE Macro on page 695 to draw a filled circle.

%CNTL2TXT Macro

Copies the values of the internal coordinates (XLAST, YLAST) to the text coordinate (XLSTT, YLSTT).

Variables written out: FUNCTION

Internal variables updated: XLSTT, YLSTT

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%CNTL2TXT ;

Details

The %CNTL2TXT macro is useful when you are calculating the position of labels on a graph. For an example, see CNTL2TXT Function on page 617.

%COMMENT Macro

Inserts a comment into an Annotate data set.

Variables written out: FUNCTION, TEXT

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%COMMENT ( text-string );

text-string

  • specifies the text to insert in the Annotate data set. The value can be a a character string enclosed in quotation marks or the name of a character variable. For details, see the Annotate TEXT Variable on page 666.

%DCLANNO Macro

Automatically sets the correct length and data type for all Annotate variables except the TEXT variable.

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%DCLANNO ;

%DRAW Macro

Draws a line from (XLAST, YLAST) to the specified coordinate.

Variables written out: COLOR, FUNCTION, LINE, SIZE, X, Y

Internal variables updated: XLAST, YLAST

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%DRAW ( x , y , color , line , size );

x , y

  • specify coordinates for the end point of the line. Values can be coordinate numbers, numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667.

color

  • specifies the color of the line using a character string without quotation marks. For details, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter.

line

  • specifies the line type (continuous or segmented). The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate LINE Variable on page 652 for the DRAW function.

size

  • specifies the width of the line. The value can be a number, a numeric constant, or a numeric variable. For valid numeric values, see the Annotate SIZE Variable on page 660 for the DRAW function.

Details

The point from which the line is drawn is usually set with the MOVE macro.

%DRAW2TXT Macro

Draws a line from the coordinate (XLAST, YLAST) to the text coordinate (XLSTT, YLSTT).

Variables written out: COLOR, FUNCTION, LINE, SIZE

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%DRAW2TXT ( color , line , size );

color

  • specifies the color of the line using a character string without quotation marks. For details, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter.

line

  • specifies the line type (continuous or segmented). The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate LINE Variable on page 652 for the DRAW function.

size

  • specifies the width of the line. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate SIZE Variable on page 660 for the DRAW function.

%FRAME Macro

Draws a border around the portion of the display area defined by the reference system and optionally fills the area.

Variables written out: COLOR, FUNCTION, LINE, SIZE, STYLE

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%FRAME ( color , line , size , style );

color

  • specifies the outline color and the optional fill color using a character string without quotation marks. For details, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter.

line

  • specifies a line type (continuous or segmented) for the frame outline and fill lines. The value can be a number, a numeric constant, or a numeric variable. For valid numeric values, see the Annotate LINE Variable on page 652 for the DRAW function.

size

  • specifies the width of the frame outline and fill lines. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate SIZE Variable on page 660 for the DRAW function.

style

  • specifies the fill pattern for the frame using a character string without quotation marks. For valid values, see the Annotate STYLE Variable (Patterns) on page 662 for the FRAME function.

Details

See %SYSTEM Macro on page 696for information on setting the reference system.

%LABEL Macro

Places a text label at the specified coordinates.

Variables written out: ANGLE, COLOR, FUNCTION, POSITION, ROTATE, SIZE, STYLE, TEXT, X, Y

Internal variables updated: XLSTT, YLSTT

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%LABEL ( x , y , text-string , color , angle , rotate , size , style , position );

x , y

  • specifies the location of the text string. Values can be coordinate numbers, numeric constants, or numeric variables. The position of the text string relative to x , y is determined by the position parameter. For details, see the Annotate X Variable on page 667.

text-string

  • specifies the text of the label. The value can be a character variable name or a character string enclosed in quotation marks. For details, see the Annotate TEXT Variable on page 666.

color

  • specifies the color of the text string using a character string without quotation marks. For details, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter.

angle

  • specifies the angle of the text string with respect to the horizontal. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate ANGLE Variable on page 642 for the LABEL function. The x , y coordinates specify the pivot point, and the position parameter positions the text relative to x , y .

rotate

  • specifies the rotation angle of each character in the text string. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate ROTATE Variable on page 659.

size

  • specifies the size of the text string. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate SIZE Variable on page 660 for the LABEL function.

style

  • specifies the text font, using a character string without quotation marks. For valid values, see the Annotate STYLE Variable (Fonts) on page 661.

position

  • specifies the placement and alignment of the text string relative to the x , y coordinates, using a text string without quotation marks. For valid values, see the Annotate POSITION Variable on page 656.

%LINE Macro

Draws a line between two sets of coordinates.

Variables written out: COLOR, FUNCTION, LINE, SIZE, X, Y

Internal variables updated: XLAST, YLAST

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%LINE ( x1 , y1 , x2 , y2 , color , line , size );

x1 , y1

  • specify the coordinates of the start of the line. Values can be numbers, numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667 variable.

x1 , y2

  • specify the coordinates of the end of the line. Values can be numbers, numeric constants, or numeric variables.

color

  • specifies the color of the line using a character string without quotation marks. For valid values, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter.

line

  • specifies the line type, which can be continuous or segmented. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate LINE Variable on page 652 for the DRAW function.

size

  • specifies the width of the line. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate SIZE Variable on page 660 for the DRAW function.

%MAPLABEL Macro

Creates an output data set that can be used with the ANNO= option for PROC GMAP.

Variables written out: FUNCTION, STYLE, COLOR, SIZE, HSYS

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%MAPLABEL ( map-dataset ,

  • attr-dataset , output-dataset , label-var , id-list , font=font_name , color=n , size=n , hsys=n );

map-dataset

  • the name of the map to be annotated.

attr-dataset

  • the name of the dataset containing the text to be shown on each ID value.

output-dataset

  • the name of the annotate data set created by the macro.

label-var

  • the name of the label variable to place on the map (the text for annotate).

id-list

  • the list of ID vars that you would issue in PROC GMAP to create the map. These values need to be on both the map and the attribute data sets. If you also supply the SEGMENT variable, then every polygon will get a value. Without the SEGMENT variable, only one label per ID set will be shown over the collection of polygons. For instance, Hawaii with SEGMENT gets a label on each island, whereas without SEGMENT, there is only one label centered on the entire set of islands.

font

  • specifies a font name for the STYLE Variable (Fonts) on page 661 variable.

color

  • specifies a value for the COLOR Variable on page 645 variable.

size

  • specifies a value for the SIZE Variable on page 660 variable. Defaults to 2.

hsys

  • specifies a value for the HSYS Variable on page 649 variable. Defaults to 3.

%MOVE Macro

Moves to the ( x , y ) coordinate.

Variables written out: FUNCTION, X, Y

Internal variables updated: XLAST, YLAST

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%MOVE ( x , y );

x , y

  • specify new coordinates for the next annotation. Values can be numeric coordinates, numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667.

%PIEXY Macro

Calculates a point in relation to the latest pie slice.

Variables written out: ANGLE, FUNCTION, SIZE, X, Y

Internal variables updated: XLAST, YLAST

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%PIEXY ( angle , size );

angle

  • specifies the angle used to calculate the point, relative to the center of the latest pie slice. The value can be a number, a numeric constant, or a numeric variable. For details, see the Annotate ANGLE Variable on page 642 for the PIEXY function.

size

  • specifies the radius multiplier that works with the angle parameter to determine the location of the point. The value can be a number, a numeric constant, or a numeric variable. For details and valid values, see the Annotate SIZE Variable on page 660 for the PIEXY function.

Details

This macro is useful when you want to label a pie chart or a circle.

When you use this macro, the Annotate facility expects a slice to have been previously drawn. If a slice has not been drawn or if the PIECNTR Function on page 630 has not been processed , you can get erroneous results.

%POLY, %POLY2 Macro

Begins drawing a polygon at the specified coordinates and determines the color, fill pattern, and line type of the polygon.

Variables written out: FUNCTION, COLOR, LINE, STYLE, X, Y,

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

  • %POLY ( x , y , color , style , line );

  • %POLY2 ( x , y , color , style , line , width );

x , y

  • specify the starting point for a new polygon. Values can be numeric coordinates, numeric constants, or numeric variables. For details, see the Annotate or the names of the Annotate variables X Variable on page 667.

color

  • specifies the optional polygon fill color using a character string without quotation marks. For valid values, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter. To specify the color of the polygon outline, see the %POLYCONT Macro on page 689.

style

  • specifies the fill pattern for the polygon, using a character string without quotation marks. For valid values, see the Annotate STYLE Variable (Patterns) on page 662 for the POLY function.

line

  • specifies the polygon's line type, which can be continuous or segmented. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate LINE Variable on page 652 for the POLY function.

width

  • specifies the width of the polygon's outline and optional fill lines. The value can be a number, a numeric constant, or a numeric variable. For details and valid values, see the Annotate SIZE Variable on page 660 for the POLY function.

See Also

  • POLY Function on page 634

%POLYCONT Macro

Continues drawing the polygon to the next specified coordinates.

Variables written out: COLOR, FUNCTION, X, Y

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%POLYCONT ( x , y , color );

x , y

  • specify the end point of the next line in the polygon. Values can be numeric coordinates, numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667.

color

  • specifies the color of the polygon outline using a character string without quotation marks. For valid values, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter.

Details

The first invocation of the %POLYCONT macro in the polygon-drawing sequence determines the outline color of that polygon. Subsequent color specifications for that polygon in later invocations of the %POLYCONT macro are ignored.

The polygon fill color and line type are specified in the initial %POLY, %POLY2 Macro on page 688 or %POLY2 macro.

%POP Macro

Removes the coordinates (XLAST, YLAST) and (XLSTT, YLSTT) from the LIFO system stack and updates the internal coordinate pairs with these retrieved values.

Variables written out: FUNCTION

Internal variables updated: XLAST, YLAST, XLSTT, YLSTT

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%POP ;

Details

Use the %POP macro when you want to access the values of the XLAST, YLAST, XLSTT, and YLSTT variables that you previously stored with the %PUSH macro. For more information, see XLAST, YLAST Variables on page 678, XLSTT, YLSTT Variables on page 678, and %PUSH Macro on page 690.

%PUSH Macro

Enters the coordinates (XLAST, YLAST) and (XLSTT, YLSTT) in a LIFO system stack.

Variables written out: FUNCTION, internal coordinates

Internal variables updated: XLAST, YLAST, XLSTT, YLSTT

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%PUSH ;

Details

The last-in, first-out (LIFO) stack provides a way to save previously calculated coordinates. It enables you to retain coordinate values for later use by utility functions without recalculating those values. In order to save coordinate values in the stack, you must explicitly push them onto the stack. See Using the LIFO Stack on page 603 for a description of the LIFO stack.

%RECT Macro

Draws a rectangle with diagonal corners at two specified points.

Variables written out: COLOR, FUNCTION, LINE, SIZE, X, Y

Internal variables updated: XLAST, YLAST

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%RECT ( x1 , y1 , x2 , y2 , color , line , size );

x1 , y1

  • specify the coordinates of the first corner of the rectangle. Values can be numeric coordinates, numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667.

x2 , y2

  • specify the coordinates of the second corner of the rectangle, which is drawn diagonal to the first corner. Values can be numeric coordinates, numeric constants, or numeric variables.

color

  • specifies the color of the rectangular line using a character string without quotation marks. For valid values, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter.

line

  • specifies the rectangle s line type, which can be continuous or segmented. The value can be a number, a numeric constant, or a numeric variable. For details, see the Annotate LINE Variable on page 652 for the DRAW function.

size

  • specifies the width of the line. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the SIZE Variable on page 660 for the DRAW function.

Details

The rectangle is drawn such that the first corner is diagonal to the second corner.

The %RECT macro produces rectangles that do not have fill patterns. Use the %BAR macro to generate filled rectangles. For more information, see %BAR, %BAR2 Macros on page 679.

%SCALE Macro

Scales input coordinates relative to the origin (0, 0) based on the relationship between two ranges of minima and maxima.

Variables written out: X, Y

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%SCALE ( ptx , pty , x1 , y1 , x2 , y2 , vx1 , vy1 , vx2 , vy2 );

ptx , pty

  • specifies the coordinates to scale. Values can be numbers, numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667.

x1 , y1

  • specifies the minima of the first range. Values can be numbers, numeric constants, or numeric variables.

x2 , y2

  • specifies the maxima of the first range. Values can be numbers, numeric constants, or numeric variables.

vx1 , vy1

  • specifies the minima of the second range. Values can be numbers, numeric constants, or numeric variables.

vx2 , vy2

  • specifies the maxima of the second range. Values can be numbers, numeric constants, or numeric variables.

Details

The %SCALE macro reduces or enlarges Annotate graphics elements that use two-dimensional, numeric coordinates. The %SCALE macro does not affect graphics elements that are drawn with text functions.

The difference between the %SCALE and %SCALET macros is that the %SCALE macro always places the origin at (0, 0) and plots the new coordinates with respect to that origin. The %SCALET macro plots the new coordinates with respect to the minima of the second range. For details, see %SCALET Macro on page 693.

The following example uses the %SCALE macro to reduce x and y coordinates by 50 percent, as shown in Figure 25.27 on page 693:

 %SCALE(x, y, 0, 0, 100, 100, 0, 0, 50, 50); 
click to expand
Figure 25.27: Using the %SCALE Macro to Reduce the Size of a Box

%SCALET Macro

Scales input coordinates based on the relationship between two ranges of minima and maxima. The scaled coordinates are plotted relative to the minima of the second range.

Variables written out: X, Y

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%SCALET ( ptx , pty , x1 , y1 , x2 , y2 , vx1 , vy1 , vx2 , vy2 );

ptx , pty

  • specifies the coordinates to scale. Values can be numbers, numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667.

x1 , y1

  • specifies the minima of the original range. Values can be numbers, numeric constants, or numeric variables.

x1 , y2

  • specifies the maxima of the original range. Values can be numbers, numeric constants, or numeric variables.

vx1 , vy1

  • specifies the minima of the second range using numeric values. Values can be numbers, numeric constants, or numeric variables. These coordinates are also used as the origin against which the scaled point is plotted.

vx2 , vy2

  • specifies the maxima of the second range. Values can be numbers, numeric constants, or numeric variables.

Details

The %SCALET macro reduces or enlarges Annotate graphics elements that use two-dimensional numeric coordinates. The %SCALET macro does not affect graphics elements that are drawn with text functions.

The difference between the %SCALET and %SCALE macros is that the SCALET macro plots the new coordinates with respect to minima of the second range ( vx1 , vy1 ). The %SCALE macro plots the new coordinates with respect to the origin (0, 0).

The following example uses the %SCALET macro reduces x and y coordinates by 50 percent and plots the new coordinates with respect to (50, 0), as shown in Figure 25.28 on page 694:

 %SCALET(x, y, 0, 0, 100, 100, 50, 0, 50, 100); 
click to expand
Figure 25.28: Using the %SCALET Macro to Reduce the Size of a Box

%SEQUENCE Macro

Specifies when to draw Annotate graphics elements, relative to the procedure s graphics output or relative to the other Annotate graphics drawn.

Variables written out: WHEN

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%SEQUENCE ( when );

when

  • Values can be BEFORE or AFTER, as defined for the Annotate WHEN Variable on page 666.

%SLICE Macro

Draws a arc, pie slice, or circle, with available line types, colors, and fill types.

Variables written out: ANGLE, COLOR, FUNCTION, LINE, ROTATE, SIZE, STYLE, X, Y

Internal variables updated: XLAST, YLAST

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%SLICE ( x , y , angle , rotate , size , color , style , line );

x , y

  • specify the center point of the arc. Values can be numbers, numeric constants, or numeric variables. For details, see the Annotate X Variable on page 667.

angle

  • specifies the starting point of the arc. The value can be a number, a numeric constant, or a numeric variable. For details and valid values, see the Annotate ANGLE Variable on page 642 for the PIE function.

rotate

  • specifies the sweep of the arc. The value can be a number, a numeric constant, or a numeric variable. For valid values, see the Annotate ROTATE Variable on page 659 for the PIE function.

size

  • specifies the radius of the arc. The value can be a number, a numeric constant, or a numeric variable. For details, see the Annotate SIZE Variable on page 660.

color

  • specifies the color of the arc outline and optional fill using a character string without quotation marks. For valid values, see the Annotate COLOR Variable on page 645. Use an asterisk (*) to specify the previous value of the color parameter.

style

  • specifies the fill pattern for the slice or circle, using a character string without quotation marks. For details and valid values, see the Annotate STYLE Variable (Patterns) on page 662 for the PIE function.

line

  • specifies which lines of a pie slice are to be drawn. The value can be a number, a numeric constant, or a numeric variable. For valid values and details, see the LINE Variable on page 652 for the PIE function.

%SWAP Macro

Exchanges control between (XLAST, YLAST) and text (XLSTT, YLSTT) coordinates.

Variables written out: FUNCTION

Internal variables updated: XLAST, YLAST, XLSTT, YLSTT

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%SWAP ;

%SYSTEM Macro

Defines the Annotate reference systems and the XSYS, YSYS, and HSYS variables.

Variables written out: HSYS, XSYS, YSYS

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%SYSTEM ( xsys , ysys , hsys );

xsys , ysys , hsys

  • specify values that represent a coordinate system and an area of the output, as defined for the Annotate XSYS Variable on page 670. The default is %SYSTEM (4, 4, 4).

Details

Note: Not all coordinate systems are valid with all Annotate variables or all SAS/ GRAPH procedures. See Annotate Functions on page 615 for any restrictions that apply to the variable that you want to use.

The ZSYS variable cannot be set through this macro. Use an explicit variable assignment instead:

 zsys='value'; output; 

See Coordinate Systems Coordinate Systems on page 596 for a description of the areas and coordinate systems.

%TXT2CNTL Macro

Assigns the values of the text (XLSTT, YLSTT) coordinates to the control (XLAST, YLAST) coordinates.

Variables written out: FUNCTION

Internal variables updated: XLAST, YLAST

Prequisite: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available on page 697.

Syntax

%TXT2CNTL ;

Details

Use the %TXT2CNTL macro when you want nontext functions to use the ending position of a text string as a starting or ending point.




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net