Chapter Contents

Previous

Next
%SLICE

%SLICE



Draws an arc or section of a fillable circle with the center at (x1,y1).

Variables affected: ANGLE, COLOR, FUNCTION, LINE, ROTATE, SIZE, STYLE, X, Y
Updates: XLAST, YLAST


Syntax

Syntax

%SLICE (x1, y1, angle, rotate, size, color, style, line);

Parameter Description
x1,y1 numeric constants or numeric variable names; the x and y coordinates of the center of the pie in the graphics output.
angle numeric constant or numeric variable name; the starting angle of the slice arc. The default is 0.00 (at the three o'clock position) if angle is not specified for the first slice. After the first slice, the default is the ending angle of the slice arc that was just drawn. Therefore, you can specify an entire pie more easily by omitting the start and end calculations otherwise required. If you want the next slice to start at an angle that is different from the ending angle of the previous slice, you must specify a value for angle. The pivot point for angle is at (x, y).
rotate numeric constant or numeric variable name; the angle of rotation of the slice arc that begins at the angle that is specified by angle. The default is 0.00. For an example of using rotate, see PIE Function.
size numeric constant or numeric variable name; the radius of the circle. The units of radius are determined by the HSYS variable. See %SYSTEM for information on setting the value of the HSYS variable when you use Annotate macros.
color literal; the color of the slice, either the fill or outline. If style is EMPTY, color only determines the color of the outline. If style is a pattern, color determines the color of the fill. Color can be any SAS/GRAPH color name and must not be enclosed in quotation marks. Use an asterisk (*) to indicate the previously defined value for color.
style literal; specifies the pattern that fills the pie slices. Values for style are the following pie and star patterns:
PSOLID
PS
a solid fill.
PEMPTY
PE
an empty fill.
Pdensity<style<angle>> a shaded pattern:

density can be 1...5

style can be X | N

angle can be 0...360

See also the discussion of fill patterns for pie and star charts in VALUE=.

line literal; specifies the slice lines to draw. See Using LINE Values with the SLICE Macro for values and their actions. LINE=NONE draws just the outside of the arc. Values for line are
WHOLE draws no radius lines.
NONE draws no radius lines.
LEAD draws a radius from lead point to center.
TRAIL draws a radius from trail point to center.
BOTH draws both lead and trail radius lines.

Using LINE Values with the SLICE Macro

[IMAGE]


Chapter Contents

Previous

Next

Top of Page

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