Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The NETDRAW Procedure

Example 5.4: The COMPRESS and PCOMPRESS Options

In Example 5.2, the number of character cell positions were specified so that the entire network fit on one page; in Example 5.3, the network spanned several pages. To force the network diagram to fit on one page automatically, you can use the COMPRESS or PCOMPRESS options. Both options use window transformations to fit the network on one page: the COMPRESS option treats the horizontal and vertical transformations independently of each other so that one direction may not be as compressed as the other; the PCOMPRESS option uses a proportional transformation so that each direction is compressed as much as the other. The following two invocations of PROC NETDRAW illustrate the differences in the diagrams produced.

In both network diagrams, PATTERN statements are used to color the nodes red or green, depending on whether the activities they represent are critical or not. The first PATTERN statement is for nodes corresponding to noncritical activities, and the second statement is for critical activities. The second invocation of PROC NETDRAW also uses the NOVCENTER option in the ACTNET statement to turn off centering in the vertical direction, so that the network is drawn immediately below the titles.

   goptions hpos=100 vpos=65 border;

   title  j=l f=swiss h=3 ' Project: Widget Manufacture';
   title2 j=l f=swiss h=2 '  Schedule Information';
   footnote f=swiss j=r h=1.5 'COMPRESS Option ';
   proc netdraw data=sched graphics;
      actnet / act=task
               succ=(succ1 succ2 succ3)
               dur = days
               carcs=blue ccritarcs=red
               font=swiss
               separatearcs
               compress;
      run;

   footnote f=swiss j=r h=1.5 'PCOMPRESS Option ';
   proc netdraw data=sched graphics;
      actnet / act=task
               succ=(succ1 succ2 succ3)
               dur = days
               carcs=blue ccritarcs=red
               font=swiss
               separatearcs
               pcompress
               novcenter;
      run;

Output 5.4.1: Project Network: COMPRESS Option
ndr4g1.gif (9998 bytes)

Output 5.4.2: Project Network: PCOMPRESS Option
ndr4g2.gif (7611 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.