Language Reference


GSCRIPT Call

CALL GSCRIPT (x, y, text <*>, angle <*>, rotate <*>, height <*>, font <*>, color <*>, window <*>, viewport );

The GSCRIPT subroutine is a graphical call that writes multiple text strings. This call is part of the traditional graphics subsystem, which is no longer being developed.

The required arguments to the GSCRIPT subroutine are as follows:

x

is a scalar or vector that contains the horizontal coordinates of the lower left starting position of the text string’s first character.

y

is a scalar or vector that contains the vertical coordinates of the lower left starting position of the text string’s first character.

text

is a character vector of text strings.

The optional arguments to the GSCRIPT subroutine are as follows:

angle

is the slant of each text string.

rotate

is the rotation of individual characters.

height

is a real number that specifies the character height.

font

is a character matrix or quoted literal that specifies a valid font name.

color

is a valid SAS color. The color argument can be specified as a quoted text string (such as 'RED'), the name of a character matrix that contains a valid color as an element, or a color number (such as 1) that refers to a color in the color list.

window

is a numeric matrix or literal that specifies a window. This is given in world coordinates and has the form

 

{minimum-x minimum-y maximum-x maximum-y}

viewport

is a numeric matrix or literal that specifies a viewport. This is given in normalized coordinates and has the same form as the window argument.

The GSCRIPT subroutine writes multiple text strings with special character fonts. The x and y vectors describe the coordinates of the lower left starting position of the text string’s first character. The color argument can have more than one element.

Note: Hardware characters cannot always be obtained if you change the HEIGHT or ASPECT parameters or if you use a viewport.

The coordinates in use for this graphics command are world coordinates. Examples of valid statements follow:

call gscript(7, y, names);
call gscript(50, 50, "plot of height vs weight");
call gscript(10, 90, "yaxis", -90, 90);