|
Chapter Contents |
Previous |
Next |
| The NETDRAW Procedure |
This example uses the SURVEY project described in Chapter 1, "Introduction to Project Management," to illustrate how you can modify the default layout of the network. The data set SURVEY contains the project information. PROC NETDRAW is invoked with the GRAPHICS option. The network diagram is shown in Output 5.13.1.
data survey;
input id $ 1-20
activity $ 22-29
duration
succ1 $ 34-41
succ2 $ 43-50
succ3 $ 52-58
phase $ 60-68;
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 f=swiss j=l ' Project: Market Survey';
title2 f=swiss j=l h=1.5 ' Changing Node Positions';
footnote f=swiss j=r '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
font=swiss
centerid
boxht = 3
htext=2
pcompress
separatearcs
ybetween=8;
run;
title2 'NETWORK Output Data Set';
proc print data=network;
run;
Output 5.13.1: Default Network Layout of SURVEY Project
|
Suppose that you want to interchange the positions of the nodes corresponding to the two activities, `Select Housholds' and `Train Personnel'. As explained in the "Controlling the Layout" section, you can invoke the procedure in FULLSCREEN mode and use the MOVE command to move the nodes to desired locations. In this example, the data set NETWORK produced by PROC NETDRAW is used to change the X and Y coordinates of the nodes. A new data set called NODEPOS is created from NETWORK by retaining only the observations containing node positions (recall that for such observations, _SEQ_ = `0') and by dropping the _SEQ_ variable. Further, the _Y_ coordinates for the two activities `Select Households' and `Train Personnel' are interchanged. The new data set, displayed in Output 5.13.3, is then input to PROC NETDRAW.
Output 5.13.2: Layout Data Set
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;
Output 5.13.3: Modified Layout Data Set
|
|
title2 f=swiss j=l h=1.5 ' Changing Node Positions';
footnote f=swiss j=r 'Modified Network Layout ';
proc netdraw data=nodepos graphics;
actnet / id=(id)
nodefid
nolabel
carcs = blue
ctext = white
coutline = red
font = swiss
centerid
boxht = 3
htext=2
pcompress
separatearcs
ybetween=8;
run;
Output 5.13.4: Modified Network Layout of SURVEY Project
|
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.