GPOINT Call

CALL GPOINT (x, y <*>, symbol <*>, color <*>, height <*>, window <*>, viewport ) ;

The GPOINT subroutine is a graphical call that draws symbols at specified locations.

The required arguments to the GPOINT subroutine are as follows:

x

is a vector that contains the horizontal coordinates of points.

y

is a vector that contains the vertical coordinates of points.

The optional arguments to the GPOINT subroutine are as follows:

symbol

is a character vector or quoted literal that specifies a valid plotting symbol or symbols.

color

is a valid SAS color, where color 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.

height

is a numeric matrix or literal that specifies the character height.

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 GPOINT subroutine marks one or more points with symbols. The x and y vectors define the locations of the markers. The symbol and color arguments can have from one to as many elements as there are well-defined points. The coordinates in use for this graphics command are world coordinates.

The following example plots the curve $y=50 + 25\sin (x/10)$ for $0 \leq x \leq 100$:

call gstart;
x = 0:100;
y = 50 + 25*sin(x/10);
call gpoint(x, y);
call gshow;

The following example uses the GPOINT subroutine to plot symbols at specific locations on the screen:

marker = {a b c d e '@' '#' '$' '%' '^' '&' '*' '-' '+' '='};
x = 5*(1:ncol(marker));
y = x;
call gpoint(x, y, marker);
call gshow;

See Chapter 15 for further examples that use the GPOINT subroutine.