%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
Requirement: You must run the %ANNOMAC macro before using any other annotate macros. For more information, see Making the Macros Available.

Syntax

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

Parameters

ptx, pty
specifies the coordinates to scale. Values can be numbers, numeric constants, or numeric variables. For details, see the Annotate X 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 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.
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);
Using the %SCALE Macro to Reduce the Size of a Box
Using the %SCALE Macro to Reduce the Size of a Box