Annotate Macros Listed Alphabetically
|
Name
|
Syntax and Description
|
|---|---|
|
%ANNOMAC;
Compiles Annotate macros and makes them available
for use.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%ARROW (x1, y1, x2, y2, color, line, size, angle, CLOSED | FILLED | OPEN);
Draws an arrow from (X1, Y1) to (X2,Y2).
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%BAR (x1, y1, x2, y2, color, line, style);
%BAR2(x1, y1, x2, y2, color, line, style, width);
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.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%CIRCLE (x, y, size, color);
Draws an empty circle with the center at (x, y).
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%CNTL2TXT;
Copies the values of the internal coordinates (XLAST,
YLAST) to the text coordinate (XLSTT, YLSTT).
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%COMMENT (text-string);
Inserts a comment into an Annotate data set.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%DCLANNO;
Automatically sets the correct length and data type
for all Annotate variables except the TEXT variable.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%DRAW (x, y, color, line, size);
Draws a line from (XLAST, YLAST) to the specified
coordinate.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%DRAW2TXT (color, line, size);
Draws a line from the coordinate (XLAST, YLAST)
to the text coordinate (XLSTT, YLSTT).
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%FRAME (color, line, size, style);
Draws a border around the portion of the display
area defined by the reference system and can fill the area.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%LABEL (x, y, text-string, color, angle, rotate, size, style, position);
Places a text label at the specified coordinates.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%LINE (x1, y1, x2, y2, color, line, size);
Draws a line between two sets of coordinates.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%MAPLABEL (map-dataset, attr-dataset,output-dataset,label-var,id-list,font=font_name,color=n,
size=n,hsys=n); Creates an output data set that can be used with
the ANNO= option for PROC GMAP.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%MOVE (x, y);
Moves to the (x, y)
coordinate.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%PIEXY (angle, size);
Calculates a point in relation to the latest pie
slice.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%POLY (x, y, color, style, line);
%POLY2(x, y, color, style, line, width); Begins drawing a polygon at the specified coordinates
and determines the color, fill pattern, and line type of the polygon.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%POLYCONT (x, y, color);
Continues drawing the polygon to the next specified
coordinates.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%POP;
Removes the coordinates (XLAST, YLAST) and (XLSTT,
YLSTT) from the LIFO system stack and updates the internal coordinate
pairs with these retrieved values.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%PUSH;
Enters the coordinates (XLAST, YLAST) and (XLSTT,
YLSTT) in a LIFO system stack.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%RECT (x1, y1, x2, y2, color, line, size)
;
Draws a rectangle with diagonal corners at two specified
points.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%SCALE (ptx, pty, x1, y1, x2, y2, vx1, vy1, vx2, vy2);
Scales input coordinates relative to the origin
(0, 0) based on the relationship between two ranges of minima and
maxima.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%SCALET (ptx, pty, x1, y1, x2, y2, vx1, vy1, vx2, vy2);
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.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%SEQUENCE (BEFORE | AFTER);
Specifies when to draw Annotate graphics elements,
relative to the procedure's graphics output or relative to the
other Annotate graphics drawn.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%SGANNO_HELP(macro-name)
| (ALL)
displays help for using the SG annotation macros.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGARROW (X1=numeric-value |
XC1=“text-string”,
Y1=numeric-value | YC1=“text-string”, X2=numeric-value | XC2=“text-string”, Y2=numeric-value | YC2=“text-string”, <options>) Draws an arrow from (X1, Y1) to (X2,Y2).
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGIMAGE (IMAGE=“file-specification” <x1, y1,
options>)
displays an image.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGLINE (X1=numeric-value |
XC1=“text-string”,
Y1=numeric-value | YC1=“text-string”, X2=numeric-value | XC2=“text-string”, Y2=numeric-value | YC2=“text-string”, <options>) Draws a line from (X1, Y1) to (X2,Y2).
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGOVAL ( HEIGHT=numeric-value,
WIDTH=numeric-value,
X1=numeric-value | XC1=“text-string”, Y1=numeric-value | YC1=“text-string”, <options>) Draws an oval annotation around the specified (X1,
Y1) coordinates using the specified height and width.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGPOLYCONT (X1=numeric-value |
XC1=“text-string”,
Y1=numeric-value | YC1=“text-string”, <options>) Continues drawing a polygon that was begun with
the %SGPOLYGON macro, or a line that was begun with the %SGPOLYLINE
macro. %SGPOLYCONT specifies each successive point in the polygon
or polyline.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGPOLYGON (X1=numeric-value |
XC1=“text-string”,
Y1=numeric-value | YC1=“text-string”, <options>) Specifies the beginning point of a polygon. A polygon
is a connected series of lines that form a closed shape. This function
is used in conjunction with two or more %SGPOLYCONT macros to define
vertex points for the polygon. Associated variables can define the
fill pattern and color, as well as the line type that outlines the
polygon.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGPOLYLINE (X1=numeric-value |
XC1=“text-string”,
Y1=numeric-value | YC1=“text-string”, <options>) Specifies the beginning point of a polyline, which
is a connected series of line segments. This function is used in conjunction
with one or more %SGPOLYCONT functions to draw a series of connected
straight lines.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGRECTANGLE (HEIGHT=numeric-value,
WIDTH=numeric-value,
X1=numeric-value | XC1=“text-string”, Y1=numeric-value | YC1=“text-string”, <options>) Draws a rectangle annotation around the specified
(X1, Y1) coordinates using the specified height and width. By default,
the (X1, Y1) coordinates constitute the center of the rectangle, though
you can change this behavior using the ANCHOR option.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGTEXT (LABEL=“text-string”, <options>)
Places text in the graph output. Associated variables
can control the color, size, font, base angle, and rotation of the
characters displayed. If you do not supply the (X1, Y1) coordinates,
the text is placed in the center of the graph.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SGTEXTCONT (LABEL=“text-string”, <options>)
Continues a text string that was begun with the
TEXT macro. You can set the continued text apart from the main text
by specifying different text attributes.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
| |
|
%SLICE (x, y, angle, rotate, size, color, style, WHOLE | NONE | LEAD | TRAIL | BOTH);
Draws a arc, pie slice, or circle, with available
line types, colors, and fill types.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%SWAP;
Exchanges control between (XLAST, YLAST) and text
(XLSTT, YLSTT) coordinates.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%SYSTEM (xsys, ysys, hsys);
Defines the Annotate reference systems and the XSYS,
YSYS, and HSYS variables.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
| |
|
%TXT2CNTL;
Assigns the values of the text (XLSTT, YLSTT) coordinates
to the control (XLAST, YLAST) coordinates.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
|
Last updated: September 24, 2026