Modifying Network Layout (netdr13)
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: NETDR13 */
/* TITLE: Modifying Network Layout (netdr13) */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: NETDRAW */
/* PROCS: PRINT, NETDRAW */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: Example 13 from the NETDRAW Chapter(PM User's Guide)*/
/* MISC: */
/* */
/****************************************************************/
data survey;
format id $20. activity succ1-succ3 $8. phase $9. ;
input id &
activity &
duration
succ1 &
succ2 &
succ3 &
phase $ ;
datalines;
Plan Survey plan sur 4 hire per design q . Plan
Hire Personnel hire per 5 trn per . . Prepare
Design Questionnaire design q 3 trn per select h print q Plan
Train Personnel trn per 3 cond sur . . Prepare
Select Households select h 3 cond sur . . Prepare
Print Questionnaire print q 4 cond sur . . Prepare
Conduct Survey cond sur 10 analyze . . Implement
Analyze Results analyze 6 . . . Implement
;
pattern1 v=s c=green;
title j=l h=3' Project: Market Survey';
title2 j=l h=2 ' Changing Node Positions';
footnote j=r h=2 'Default Layout ';
proc netdraw data=survey graphics out=network;
actnet / act=activity
succ=(succ1-succ3)
id=(id) nodefid nolabel
carcs = blue
ctext = white
coutline=red
centerid
boxht = 3
htext=2
pcompress
separatearcs
ybetween=8;
run;
footnote;
title2 'NETWORK Output Data Set';
proc print data=network;
run;
data nodepos;
set network;
if _seq_ = 0;
drop _seq_;
if _from_ = 'select h' then _y_=1;
if _from_ = 'trn per' then _y_=3;
run;
title2 'Modified Node Positions';
proc print data=nodepos;
run;
title j=l h=3 ' Project: Market Survey';
title2 j=l h=2 ' Changing Node Positions';
footnote j=r h=2 'Modified Network Layout ';
proc netdraw data=nodepos graphics;
actnet / id=(id) nodefid nolabel
carcs = blue
ctext = white
coutline = red
centerid
boxht = 3
htext=2
pcompress
separatearcs
ybetween=8;
run;