Language Reference

GPOINT Call

plots points

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

The inputs to the GPOINT subroutine are as follows:
x
is a vector containing the x coordinates of points.

y
is a vector containing the y coordinates of points.

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 containing a valid color as an element, or a color number (such as 1). A color number n refers to the nth color in the color list.

height
is a numeric matrix or literal specifying the character height.

window
is a numeric matrix or literal specifying 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 specifying a viewport. This is given in normalized coordinates and has the form

 {minimum-x minimum-y maximum-x maximum-y}
The GPOINT subroutine marks one or more points with symbols. The x and y vectors define the points where the markers are to be placed. 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.

In the example that follows, points on the line y=x are generated for 30 \leq x \leq 80 and then plotted with the GPOINT call:

  
    x=30:80; 
    y=x; 
    call gpoint(x,y); 
    call gshow;
 
As another example, you can plot symbols at specific locations on the screen by using the GPOINT subroutine. To print i in the lower-left corner and j in the upper-right corner, use the following statements:
  
    call gpoint({10 80},{5 95},{i j}); 
    call gshow;
 
See Chapter 12 for examples using the GPOINT subroutine.

Previous Page | Next Page | Top of Page