Resources

Tree Diagrams and Organizational Charts (netdre15)

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: NETDRE15                                            */
/*   TITLE: Tree Diagrams and Organizational Charts (netdre15)  */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: NETDRAW                                             */
/*   PROCS: FORMAT, NETDRAW                                     */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF:                                                     */
/*     REF: Example 15 from the NETDRAW Chapter(PM User's Guide)*/
/*    MISC:                                                     */
/*                                                              */
/****************************************************************/

data document;
   format parent child $8. id $24.;
   input parent $ child $ id & _pattern;
   datalines;
OR       MPBOOK     Operations Research       1
OR       PMBOOK     Operations Research       1
PMBOOK   CPM        Project Management        2
PMBOOK   DTREE      Project Management        2
PMBOOK   GANTT      Project Management        2
PMBOOK   NETDRAW    Project Management        2
PMBOOK   PM         Project Management        2
PMBOOK   PROJMAN    Project Management        2
MPBOOK   OPTMODEL   Mathematical Programming  3
MPBOOK   OPTLP      Mathematical Programming  3
MPBOOK   OPTMILP    Mathematical Programming  3
MPBOOK   OPTQP      Mathematical Programming  3
CPM      .          CPM Procedure             2
DTREE    .          DTREE Procedure           2
GANTT    .          GANTT Procedure           2
NETDRAW  .          NETDRAW Procedure         2
PM       .          PM Procedure              2
PROJMAN  .          PROJMAN Application       2
OPTMODEL .          OPTMODEL Procedure        3
OPTLP    .          OPTLP Procedure           3
OPTMILP  .          OPTMILP Procedure         3
OPTQP    .          OPTQP Procedure           3
;

pattern1 v=s c=blue;
pattern2 v=s c=red;
pattern3 v=s c=green;

title j=l h=3 'Operations Research Documentation';
title2 j=l h=2 'Procedures in Each Volume';
footnote j=r h=2 'Default Tree Layout ';
proc netdraw graphics data=document;
   actnet / act=parent
            succ=child
            id=(id)
            nodefid
            nolabel
            pcompress
            centerid
            tree
            xbetween=15
            ybetween=3
            arrowhead=0
            rectilinear
            carcs=black
            ctext=white
            htext=3;
   run;

footnote j=r h=1.5 'Centered Tree Layout ';
proc netdraw graphics data=document;
   actnet / act=parent
            succ=child
            id=(id)
            nodefid
            nolabel
            pcompress
            novcenter
            centerid
            tree
            separatesons
            centersubtree
            xbetween=15
            ybetween=3
            arrowhead=0
            rectilinear
            carcs=black
            ctext=white
            htext=3.5;
   run;