Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

GPIE Call

draws pie slices

CALL GPIE( x, y, r<, angle1><, angle2><, color><, outline>
           <, pattern><, window><, viewport>);

The inputs to the GPIE subroutine are AS FOLLOWS:
x and y
are numeric scalars (or possibly vectors) defining the center (or centers) of the pie (or pies).

r
is a scalar or vector giving the radii of the pie slices.

angle1
is a scalar or vector giving the start angles. It defaults to 0.

angle2
is a scalar or vector giving the terminal angles. It defaults to 360.

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.

outline
is an index indicating the side of the slice to draw. The default is 3.

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

window
is a numeric matrix or literal specifying a window. This is given in world coordinates and has the form
   {\ob minimum-x minimum-y maximum-x maximum-y\obe}


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 GPIE subroutine draws one or more pie slices. The number of pie slices is the maximum dimension of the first five vectors. The angle arguments are specifed in degrees. The start angle (angle1) defaults to 0, and the terminal angle (angle2) defaults to 360. Outline is an index that indicates the side of the slice to draw. The outline specification can be one of the following:

<0
uses absolute value as the line style and draws no line segment from center to arc.

0
draws no line segment from center to arc.

1
draws an arc and line segment from the center to the starting angle point.

2
draws an arc and line segment from the center to the ending angle point.

3
draws all sides of the slice. This is the default.
Color, outline, and pattern can have more than one element. The coordinates in use for this graphics command are world coordinates. An example using the GPIE subroutine follows:
       /* draws a pie with 4 slices of equal size */
    call gpie(50,50,30,{0 90 180 270},{90 180 270 0});

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.