Language Reference

GPOLY Call

draws and fills a polygon

CALL GPOLY( x, y\lt, style<, ocolor<, pattern<, color>
           <, window<, viewport>);

The inputs to the GPOLY subroutine are as follows.
x
is a vector defining the x coordinates of the corners of the polygon.

y
is a vector defining the y coordinates of the corners of the polygon.

style
is a numeric matrix or literal that specifies an index corresponding to a valid line style.

ocolor
is a matrix or literal specifying a valid outline color. The ocolor argument 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.

pattern
is a character matrix or quoted literal that specifies the pattern to fill the interior of a closed curve.

color
is a valid SAS color used in filling the polygon. The color argument 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.

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 GPOLY subroutine fills an area enclosed by a polygon. The polygon is defined by the set of points given in the vectors x and y. The color argument is the color used in shading the polygon, and ocolor is the outline color. By default, the shading color and the outline color are the same, and the interior pattern is empty. The coordinates in use for this graphics command are world coordinates. An example that uses the GPOLY subroutine follows:
  
    xd={20 20 80 80}; 
    yd={35 85 85 35}; 
    call gpoly (xd,yd, , ,'X','red');
 

Previous Page | Next Page | Top of Page