Previous Page | Next Page

The GCHART Procedure

Example 12: Charting a Discrete Numeric Variable in a Star Chart


Procedure features:

STAR statement options:

DISCRETE

FILL=

NOCONNECT

NOHEADING

SUMVAR=

Other features:

GOPTIONS statement option:

BORDER

Sample library member: GCHDSCRT

[GCHDSCRT-Charting a discrete numeric variable in a star chart]

This example produces two star charts that show the total number of parts that were rejected each month for a year. The STAR statement uses the DISCRETE option so that each unique value of the numeric variable DATE is a separate midpoint and has a separate spine. Each slice displays the formatted midpoint value and the chart statistic. Specifying FILL=S rotates the solid pattern through all the colors in the style's list of colors as many times as necessary to provide patterns for all the slices.

The second chart uses the NOCONNECT option so that the chart uses spines instead of slices.

[Star chart using spines instead of slices]

 Note about code
goptions reset=all border;
 Note about code
data rejects;
informat date date9.;
input site $ date badparts;
datalines;
Sydney 01JAN1997 8
Sydney 01FEB1997 11
Sydney 28JUN1997 13
Sydney 31OCT1997 6
Paris 11APR1997 12
Paris 04MAY1997 12
Paris 30AUG1997 14
Paris 01DEC1997 7
Atlanta 15MAR1997 7
Atlanta 18JUL1997 12
Atlanta 03SEP1997 10
Atlanta 12NOV1997 9
;
 Note about code
title "Rejected Parts";
footnote j=r "GCHDSCRT(a) "; 
 Note about code
proc gchart data=rejects;
format date worddate3.;
star date / discrete
sumvar=badparts
noheading
fill=s;
run; 
 Note about code
footnote j=r "GCHDSCRT(b) ";
 Note about code
star date / discrete
sumvar=badparts
noheading
noconnect;
run;
quit; 

Previous Page | Next Page | Top of Page