%LABEL Annotate Macro

Places a text label at the specified coordinates.

Updates:XLSTT, YLSTT
Variables written out:ANGLE, COLOR, FUNCTION, POSITION, ROTATE, SIZE, STYLE, TEXT, X, Y
Requirement:You must run the %ANNOMAC macro before using this or any of the other SAS/GRAPH annotate macros. See Making the Macros Available.

Table of Contents

Syntax

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

Parameters

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.

SeeX Variable and Y Variable

text-string

specifies the text of the label. The value can be a character variable name or a character string enclosed in quotation marks.

SeeTEXT Variable

color

specifies the color of the text string using a character string without quotation marks. Use an asterisk (*) to specify the previous value of the color parameter.

SeeCOLOR Variable

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. The x, y coordinates specify the pivot point, and the position parameter positions the text relative to x, y.

SeeANGLE Variable for the LABEL function for valid angle values.

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.

SeeROTATE Variable

size

specifies the size of the text string. The value can be a number, a numeric constant, or a numeric variable.

SeeSIZE Variable for the LABEL function for valid size values.

style

specifies the text font, using a character string without quotation marks.

SeeSTYLE Variable: Fonts

position

specifies the placement and alignment of the text string relative to the x, y coordinates, using a text string without quotation marks.

SeePOSITION Variable
Last updated: January 17, 2025