%SCALE Annotate 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 |
|---|---|
| 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
Parameters
ptx, pty
specifies the coordinates to scale. Values can be numbers, numeric constants, or numeric variables.
| See | X Variable and Y Variable |
|---|
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 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 at (0, 0) and 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 Annotate Macro.
The following example uses the %SCALE macro to reduce x and y coordinates by 50%, as shown in Using the %SCALE Macro to Reduce the Size of a Box.
%SCALE(x, y, 0, 0, 100, 100, 0, 0, 50, 50);