Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Details and Examples

Example 29.5: Highlighting Combinations of Cells

This example is a continuation of Example 29.4.
See PARETO1 in the SAS/QC Sample Library

In some applications involving comparative Pareto charts, it is useful to classify the cells into groups. This example shows how you can display this type of classification by coloring the tiles and adding a legend.

Suppose that you want to enhance Output 29.4.1 by highlighting the two cells for which PROCESS=Process B and DAY=March 4 and March 5 to emphasize the improvement displayed in those cells. Begin by adding a tile color variable (TILECOL) and a tile legend variable (TILELEG) to the data set FAILURE4.

 data failure4;
   length tilecol $ 8 tileleg $ 16 ;
   set failure4;
   if (process='Process B') and (day='March 4' or day='March 5')
   then do; tilecol='ywh'; tileleg = 'Improvement'; end;
   else do; tilecol='ligr' ; tileleg = 'Status Quo' ; end; run;
run;

The following statements specify TILECOL as a CTILES= variable and TILELEG as a TILELEGEND= variable. Note that the variable names are enclosed in parentheses.

   title 'Where Did Improvement Occur?';
   proc pareto data=failure4;
      vbar cause / class        = ( process day )
                   freq         = counts
                   nrows        = 2
                   ncols        = 5
                   last         = 'Miscellaneous'
                   scale        = count
                   catleglabel  = 'Failure Causes:'
                   cbars        = ( color )
                   pbars        = ( pattern )
                   barlegend    = ( priority )
                   barleglabel  = 'Priority:'
                   ctiles       = ( tilecol )
                   tilelegend   = ( tileleg )
                   tileleglabel = 'Condition:'
                   intertile    = 1.0
                   nohlabel
                   nocurve ;
   run;

In the chart, shown in Output 29.5.1, the values displayed in the legend labeled Condition: are the levels of the TILELEGEND= variable.

Output 29.5.1: Highlighting Specific Tiles
parex5.gif (8291 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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