Chapter Contents

Previous

Next
The GCHART Procedure

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


Procedure features:
STAR statement options:
COUTLINE=
DISCRETE
FILL=
NOCONNECT
NOHEADING
SUMVAR=
Sample library member: GR13N14

[IMAGE]

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 colors list 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.

[IMAGE]

 Note about code
goptions reset=global gunit=pct border cback=white
         colors=(black blue green red) ftext=swiss
         ftitle=swissb htext=3.5 htitle=6;
 Note about code
data rejects;
   informat date date9.;
   input site $ date badparts;
   datalines;
Sydney  01JAN1997 22
Sydney  01FEB1997 26
...more data lines...
Paris   01NOV1997 12
Paris   01DEC1997 19
;
 Note about code
title 'Rejected Parts';
footnote j=r 'GR13N14(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 'GR13N14(b) ';
 Note about code
   star date / discrete
               sumvar=badparts
               noheading
               noconnect
               coutline=red;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

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