Tape Measure Manufacturing

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: ISHIKAW1                                            */
 /*   TITLE: Tape Measure Manufacturing                          */
 /* PRODUCT: QC                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: Ishikawa Diagrams,                                  */
 /*   PROCS: GANNO                                               */
 /*    DATA:                                                     */
 /*                                                              */
 /*     REF: SAS/QC Software:  Examples                          */
 /*    MISC: Before you run this program, include a statement    */
 /*          that associates the fileref name ISHIKAWA with      */
 /*          the program ISHIKAWA that is located in the sample  */
 /*          library.                                            */
 /*                                                              */
 /****************************************************************/

options ps=60 ls=80;
data default;
   input
   textht     /* text height for trunk, branch, and stem text    */
   textht2    /* text height for leaf text                       */
   dfltcol $  /* default color for BR, ST, and LF arrows & text  */
   fill    $  /* polygon fill pattern for TR and BR rectangles   */
   font    $  /* font for LF text                                */
   xfont   $  /* font for TR, BR, and ST text                    */
   alength    /* arrow head length                               */
   awidth     /* arrow head width (a percentage of alength)      */
   lwidth     /* line width                                      */
   hsize      /* length of plotting area in horizontal direction */
   vsize      /* length of plotting area in vertical direction   */
   angle      /* angle (degrees) at intersection of tr and br    */
   blength    /* default branch length                           */
   slength    /* default stem length                             */
   llength;   /* default leaf length                             */
   cards;
3 2.5 RED E SWISS SWISS 1 0.5 0.25 7 7 75 40 5 3
;


data title;
   length title $ 80;
   input
   title & $   /* title text                                     */
   textht      /* text height                                    */
   align   $   /* L=left aligned, C=centered, R=right aligned    */
   color   $   /* text color                                     */
   font    $ ; /* text font                                      */
   cards;
.  . . . .
;


data footnote;
   length footnote $ 80;
   input footnote & $ textht align $ color $ font $;
   cards;
.  . . . .
;


data border;
   input line size color $;
   cards;
. . .
;


data effect;
   length t1-t5 $ 80;
   input
   fromx    /* X-coordinate from which TR arrow originates       */
   tox      /* X-coordinate for the terminal point of TR arrow   */
   y        /* Y-coordinate for the TR arrow                     */
   shrinkx  /* amount the length of the TR rectangle is reduced  */
   shrinky  /* amount the height of the TR rectangle is reduced  */
   trunkth  /* arrow width                                       */
   textht   /* text height                                       */
   color $  /* text color                                        */
   font  $  /* text font                                         */
   fill  $  /* polygon fill pattern for the TR rectangle         */
   t1 &  $  /* 1st line of text                                  */
   t2 &  $  /* 2nd line of text                                  */
   t3 &  $  /* 3rd line of text                                  */
   t4 &  $  /* 4th line of text                                  */
   t5 &  $ ;/* 5th line of text                                  */
   cards;
15 85 50 4 0 2 . RED SWISS . Customer  Complaints  .  .  .
;


data causes;
   length text1 text2 $ 80;
   input
   bsl     $  /* only enter: BRANCH, STEM, or LEAF               */
   side    $  /* T or B for branches and leafs                   */
              /* R or L for stems (override value)               */
   length     /* branch, stem, and leaf length (override value)  */
   pct        /* emergence point: 0<=pct<=1  (override value)    */
   color   $  /* arrow and text color (override value)           */
   text1 & $  /* 1st line of text                                */
   text2 & $ ;/* 2nd line of text                                */
   cards;
BRANCH    .   .  .     .    Drum         .
   STEM   .   .  .     .    Hole         diameter
   STEM   .   .  .     .    Drum         diameter
   STEM   .   .  .     .    Flange       width
BRANCH    .   .  .     .    Blade        .
   STEM   .   .  .     .    Calibration  .
   STEM   .   .  .     .    Paint        adhesion
   STEM   .   .  .     .    Paint        burns
   STEM   .   .  .     .    Paint        thickness
   STEM   .   .  .     .    Color        .
BRANCH    .   .  .     .    Assembly     .
   STEM   .   .  .     .    Packing      .
   STEM   .   .  .     .    Tension      adjustment
   STEM   .   .  .     .    Inspection   .
;


%include ishikawa / nosource2;

data all;
   set effect causes;
run;

proc ganno anno=all;
run;
goptions reset=all;