1 | --- afterglow.pl.orig 2014-02-11 19:51:20.000000000 -0500 |
---|
2 | +++ afterglow.pl 2014-02-11 19:52:40.000000000 -0500 |
---|
3 | @@ -661,7 +661,7 @@ |
---|
4 | |
---|
5 | my $options = ""; |
---|
6 | |
---|
7 | -if (defined(@sourceSizeExp) || defined(@eventSizeExp) || defined(@targetSizeExp)) { |
---|
8 | +if ((@sourceSizeExp) || (@eventSizeExp) || (@targetSizeExp)) { |
---|
9 | $options = ", fixedsize=true"; |
---|
10 | } |
---|
11 | |
---|
12 | @@ -804,7 +804,7 @@ |
---|
13 | } |
---|
14 | |
---|
15 | # calculate the size of the node |
---|
16 | - if (defined(@sourceSizeExp)) { |
---|
17 | + if ((@sourceSizeExp)) { |
---|
18 | # calculate the size of the node. Add to existing value to take care of |
---|
19 | # source/target nodes and nodes showing up multiple times |
---|
20 | if ($sumSource) { |
---|
21 | @@ -837,7 +837,7 @@ |
---|
22 | |
---|
23 | # calculate the size of the node. Add to existing value to take care of |
---|
24 | # source/target nodes and nodes showing up multiple times |
---|
25 | - if (defined(@eventSizeExp)) { |
---|
26 | + if ((@eventSizeExp)) { |
---|
27 | if ($sumEvent) { |
---|
28 | $eventNodeSize{$eventName} += getSize("event",@fields); |
---|
29 | } else { |
---|
30 | @@ -857,7 +857,7 @@ |
---|
31 | } else { |
---|
32 | $targetMap{$targetName} = $target; |
---|
33 | } |
---|
34 | - if (defined(@targetSizeExp)) { |
---|
35 | + if ((@targetSizeExp)) { |
---|
36 | if ($sumTarget) { |
---|
37 | $targetNodeSize{$targetName} += getSize("target",@fields); |
---|
38 | } else { |
---|
39 | @@ -880,11 +880,11 @@ |
---|
40 | $sourceTargetLinkMap{$sourceTargetLinkName} = $sourceTargetLinkName; |
---|
41 | |
---|
42 | # Edge Color |
---|
43 | - if (defined(@edgeColorExp)) { |
---|
44 | + if ((@edgeColorExp)) { |
---|
45 | $edgeColor{$sourceTargetLinkName} = getColor("edge",@fields); |
---|
46 | } |
---|
47 | # Edge Size |
---|
48 | - if (defined(@edgeSizeExp)) { |
---|
49 | + if ((@edgeSizeExp)) { |
---|
50 | $edgeSize{$sourceTargetLinkName} = getSize("edge",@fields); |
---|
51 | } |
---|
52 | |
---|
53 | @@ -895,11 +895,11 @@ |
---|
54 | $sourceEventLinkMap{$sourceEventLinkName} = $sourceEventLinkName; |
---|
55 | |
---|
56 | # Edge Color |
---|
57 | - if (defined(@edgeColorExp)) { |
---|
58 | + if ((@edgeColorExp)) { |
---|
59 | $edgeColor{$sourceEventLinkName} = getColor("edge",@fields); |
---|
60 | } |
---|
61 | # Edge Size |
---|
62 | - if (defined(@edgeSizeExp)) { |
---|
63 | + if ((@edgeSizeExp)) { |
---|
64 | $edgeSize{$sourceEventLinkName} = getSize("edge",@fields); |
---|
65 | } |
---|
66 | |
---|
67 | @@ -907,11 +907,11 @@ |
---|
68 | $eventTargetLinkMap{$eventTargetLinkName} = $eventTargetLinkName; |
---|
69 | |
---|
70 | # Edge Color |
---|
71 | - if (defined(@edgeColorExp)) { |
---|
72 | + if ((@edgeColorExp)) { |
---|
73 | $edgeColor{$eventTargetLinkName} = getColor("edge",@fields); |
---|
74 | } |
---|
75 | # Edge Size |
---|
76 | - if (defined(@edgeSizeExp)) { |
---|
77 | + if ((@edgeSizeExp)) { |
---|
78 | $edgeSize{$eventTargetLinkName} = getSize("edge",@fields); |
---|
79 | } |
---|
80 | |
---|
81 | @@ -949,13 +949,13 @@ |
---|
82 | |
---|
83 | # Color |
---|
84 | my $color = (); |
---|
85 | - if (defined(@edgeColorExp)) { |
---|
86 | + if ((@edgeColorExp)) { |
---|
87 | $color = $edgeColor{$sourceTargetLinkName}; |
---|
88 | } |
---|
89 | |
---|
90 | # Size |
---|
91 | my $size = 0; |
---|
92 | - if (defined(@edgeSizeExp)) { |
---|
93 | + if ((@edgeSizeExp)) { |
---|
94 | $size = $edgeSize{$sourceTargetLinkName}; |
---|
95 | } |
---|
96 | |
---|
97 | @@ -1050,13 +1050,13 @@ |
---|
98 | |
---|
99 | # Color |
---|
100 | my $color = (); |
---|
101 | - if (defined(@edgeColorExp)) { |
---|
102 | + if ((@edgeColorExp)) { |
---|
103 | $color = $edgeColor{$sourceEventLinkName}; |
---|
104 | } |
---|
105 | |
---|
106 | # Size |
---|
107 | my $size = 0; |
---|
108 | - if (defined(@edgeSizeExp)) { |
---|
109 | + if ((@edgeSizeExp)) { |
---|
110 | $size = $edgeSize{$sourceEventLinkName}; |
---|
111 | |
---|
112 | # print STDERR "size: $size / color: $color\n"; |
---|
113 | @@ -1141,13 +1141,13 @@ |
---|
114 | |
---|
115 | # Color |
---|
116 | my $color = (); |
---|
117 | - if (defined(@edgeColorExp)) { |
---|
118 | + if ((@edgeColorExp)) { |
---|
119 | $color = $edgeColor{$eventTargetLinkName}; |
---|
120 | } |
---|
121 | |
---|
122 | # Size |
---|
123 | my $size = 0; |
---|
124 | - if (defined(@edgeSizeExp)) { |
---|
125 | + if ((@edgeSizeExp)) { |
---|
126 | $size = $edgeSize{$eventTargetLinkName}; |
---|
127 | } |
---|
128 | |
---|
129 | @@ -1248,11 +1248,11 @@ |
---|
130 | |
---|
131 | # Assign differnet color to a node which is a source and target at the same time? |
---|
132 | if ($targetMap{$sourceName}) { |
---|
133 | - if (defined(@sourcetargetColorExp)) { |
---|
134 | + if ((@sourcetargetColorExp)) { |
---|
135 | $sourceColor = $sourcetargetColorMap{$sourceName}; |
---|
136 | } else { |
---|
137 | # print the node already here instead of in the target section |
---|
138 | - if (defined(@sourceColorExp)) { |
---|
139 | + if ((@sourceColorExp)) { |
---|
140 | $sourceColor = $sourceColorMap{$sourceName}; |
---|
141 | } else { |
---|
142 | $sourceColor = $targetColorMap{$sourceName}; |
---|
143 | @@ -1290,7 +1290,7 @@ |
---|
144 | |
---|
145 | # size of node |
---|
146 | my $size=1; |
---|
147 | - if (defined(@sourceSizeExp)) { |
---|
148 | + if ((@sourceSizeExp)) { |
---|
149 | $size = sprintf ("%.2f",($maxNodeSize / $maxActualSourceNodeSize) * $sourceNodeSize{$sourceName}); |
---|
150 | } |
---|
151 | print ",$size"; |
---|
152 | @@ -1313,7 +1313,7 @@ |
---|
153 | } |
---|
154 | |
---|
155 | my $size=1; |
---|
156 | - if (defined(@sourceSizeExp)) { |
---|
157 | + if ((@sourceSizeExp)) { |
---|
158 | $size = sprintf ("%.2f",($maxNodeSize / $maxActualSourceNodeSize) * $sourceNodeSize{$sourceName}); |
---|
159 | } |
---|
160 | $out .= "\t\t\t\"size\" : \"$size\",\n"; |
---|
161 | @@ -1336,7 +1336,7 @@ |
---|
162 | my $out = " [fillcolor=$sourceColor, $ll"; |
---|
163 | |
---|
164 | # size of node |
---|
165 | - if (defined(@sourceSizeExp)) { |
---|
166 | + if ((@sourceSizeExp)) { |
---|
167 | #print STDERR "MaxActualSize: $maxActualSourceNodeSize maxNodeSize: $maxNodeSize currentSize: $sourceNodeSize{$sourceName}\n"; |
---|
168 | my $size=0; |
---|
169 | $size = sprintf ("%.2f",($maxNodeSize / $maxActualSourceNodeSize) * $sourceNodeSize{$sourceName}); |
---|
170 | @@ -1410,7 +1410,7 @@ |
---|
171 | |
---|
172 | # size of node |
---|
173 | my $size=1; |
---|
174 | - if (defined(@eventSizeExp)) { |
---|
175 | + if ((@eventSizeExp)) { |
---|
176 | $size = sprintf ("%.2f",($maxNodeSize / $maxActualEventNodeSize) * $eventNodeSize{$eventName}); |
---|
177 | } |
---|
178 | print ",$size"; |
---|
179 | @@ -1433,7 +1433,7 @@ |
---|
180 | } |
---|
181 | |
---|
182 | my $size=1; |
---|
183 | - if (defined(@eventSizeExp)) { |
---|
184 | + if ((@eventSizeExp)) { |
---|
185 | $size = sprintf ("%.2f",($maxNodeSize / $maxActualEventNodeSize) * $eventNodeSize{$eventName}); |
---|
186 | } |
---|
187 | $out .= "\t\t\t\"size\" : \"$size\",\n"; |
---|
188 | @@ -1456,7 +1456,7 @@ |
---|
189 | my $out = " [shape=box, fillcolor=$eventColor, $ll"; |
---|
190 | |
---|
191 | # size of node |
---|
192 | - if (defined(@eventSizeExp)) { |
---|
193 | + if ((@eventSizeExp)) { |
---|
194 | my $size=0; |
---|
195 | $size = sprintf ("%.2f",($maxNodeSize / $maxActualEventNodeSize) * $eventNodeSize{$eventName}); |
---|
196 | $out .= ",width=\"$size\""; |
---|
197 | @@ -1517,7 +1517,7 @@ |
---|
198 | |
---|
199 | # size of node |
---|
200 | my $size=1; |
---|
201 | - if (defined(@targetSizeExp)) { |
---|
202 | + if ((@targetSizeExp)) { |
---|
203 | $size = sprintf ("%.2f",($maxNodeSize / $maxActualTargetNodeSize) * $targetNodeSize{$targetName}); |
---|
204 | } |
---|
205 | print ",$size"; |
---|
206 | @@ -1540,7 +1540,7 @@ |
---|
207 | } |
---|
208 | |
---|
209 | my $size=1; |
---|
210 | - if (defined(@targetSizeExp)) { |
---|
211 | + if ((@targetSizeExp)) { |
---|
212 | $size = sprintf ("%.2f",($maxNodeSize / $maxActualTargetNodeSize) * $targetNodeSize{$targetName}); |
---|
213 | } |
---|
214 | $out .= "\t\t\t\"size\" : \"$size\",\n"; |
---|
215 | @@ -1563,7 +1563,7 @@ |
---|
216 | my $out = " [fillcolor=$targetColor, $ll"; |
---|
217 | |
---|
218 | # size of node |
---|
219 | - if (defined(@targetSizeExp)) { |
---|
220 | + if ((@targetSizeExp)) { |
---|
221 | # print STDERR "MaxActualSize: $maxActualTargetNodeSize maxNodeSize: $maxNodeSize currentSize: $targetNodeSize{$targetName} targetName: $targetName\n"; |
---|
222 | my $size=0; |
---|
223 | $size = sprintf ("%.2f",($maxNodeSize / $maxActualTargetNodeSize) * $targetNodeSize{$targetName}); |
---|