d91e45b24b2bc358a7c941f20e36150268f58f0c
3 # Graph a sequence of lines as prev->next relationships,
4 # highlighting frequencies of pairings.
7 BEGIN {print "digraph {"}
10 prev = prev ? prev
: "--"
13 ++nlinks_to
[prev
, curr
]
18 for (src_dst in nlinks_to
) {
19 split(src_dst
, sd
, SUBSEP
);
23 n = nlinks_to
[src
, dst
]
24 penwidth = num_scale
(n
, m
, 1, 9)
25 color =
sprintf("/orrd9/%d", num_scale
(n
, m
, 2, 9))
26 label =
sprintf("%s %.2f%%", src
, (n
/ m
) * 100)
30 , fontname=monospace \
37 src
, dst
, label
, penwidth
, color
;
42 function num_scale
(src_cur
, src_max
, dst_min
, dst_max
) {
43 return dst_min
+ ((src_cur
* (dst_max
- dst_min
)) / src_max
)
This page took 0.062497 seconds and 3 git commands to generate.