Resources

Positioning Insets in Pareto Charts

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: PARINS                                              */
/*   TITLE: Positioning Insets in Pareto Charts                 */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Pareto Charts                                       */
/*   PROCS: PARETO                                              */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: saswgr                                              */
/*     REF: PROC PARETO, Details Example 1                      */
/*    MISC:                                                     */
/*                                                              */
/****************************************************************/

data Failure3;
   length Cause $ 16 Stage $ 16;
   label  Cause = 'Cause of Failure';
   input  Stage & $ Cause & $ Counts;
datalines;
Before Cleaning   Contamination    14
Before Cleaning   Corrosion         2
Before Cleaning   Doping            1
Before Cleaning   Metallization     2
Before Cleaning   Miscellaneous     3
Before Cleaning   Oxide Defect      8
Before Cleaning   Silicon Defect    1
After Cleaning    Doping            0
After Cleaning    Corrosion         2
After Cleaning    Metallization     4
After Cleaning    Miscellaneous     2
After Cleaning    Oxide Defect      1
After Cleaning    Contamination    12
After Cleaning    Silicon Defect    2
;


proc pareto data=Failure3;
   vbar Cause / freq     = Counts
                odstitle = "Insets at Compass Point Positions"
                nocurve
                ;
   inset n / cfill header='NW' pos=nw;
   inset n / cfill header='N ' pos=n ;
   inset n / cfill header='NE' pos=ne;
   inset n / cfill header='E ' pos=e ;
   inset n / cfill header='SE' pos=se;
   inset n / cfill header='S ' pos=s ;
   inset n / cfill header='SW' pos=sw;
   inset n / cfill header='W ' pos=w ;
run;

ods graphics off;
title 'Integrated Circuit Failures';
proc pareto data=Failure3;
   vbar Cause / freq = Counts;
   inset n / header   = 'Position=(3,60)'
             position = (3,60) data
             height   = 3;
run;

proc pareto data=Failure3;
   vbar Cause / freq     = Counts
                maxncat  = 5;
   inset n / position = (5,25)
             header   = 'Position=(5,25)'
             height   = 3
             cfill    = blank
             refpoint = tl;
   inset nexcl / position = (95,95)
                 header   = 'Position=(95,95)'
                 height   = 3
                 cfill    = blank
                 refpoint = tr;
run;