public
Description: numbr5 is alive - our friendly #roro bot
Homepage: http://faces.rubyonrails.com.au
Clone URL: git://github.com/lachie/numbr5.git
tweaked graph colours
lachie (author)
Mon Mar 24 18:46:37 -0700 2008
commit  935363b75fb5a503f139a053b2cb0beb7df4cbd4
tree    946a547a06cba19efcce4720585c642dde8f399f
parent  96d514d6cb5e94c18ed120c3063c497000d06be4
...
20
21
22
23
 
24
25
 
26
27
28
 
 
29
30
31
...
50
51
52
53
 
54
55
56
...
62
63
64
65
 
 
66
67
...
20
21
22
 
23
24
 
25
26
 
 
27
28
29
30
31
...
50
51
52
 
53
54
55
56
...
62
63
64
 
65
66
67
68
0
@@ -20,12 +20,12 @@ task :graph do
0
     size="12,12";
0
     overlap=scale;
0
     splines=true;
0
- sep=.1;
0
+ sep=.5;
0
     margin=".1,.1";
0
-
0
+ bgcolor=white;
0
 
0
- node [shape = circle, fixedsize=true, fontcolor=red, fontname=Helvetica, fontsize=10, color=blue];
0
- edge [arrowsize=0.35, len=2.0, color=gray];
0
+ node [shape = circle, fixedsize=true, fontcolor="#86171d", fontname=Helvetica, fontsize=12, color=blue];
0
+ edge [arrowsize=0.5, len=1.0, color="#a6803a"];
0
     }
0
   
0
   users = Hash.new {|h,k| h[k] = 0}
0
@@ -50,7 +50,7 @@ task :graph do
0
   min = 0.1
0
   users.each do |(from,count)|
0
     width = ((count / total.to_f) * (max-min)) + min
0
- dot.puts "\t#{from} [width=#{width}];"
0
+ dot.puts "\t#{from} [width=#{width},label=\"\\N (#{count})\"];"
0
         
0
     tos = user_to[from] || {}
0
     
0
@@ -62,5 +62,6 @@ task :graph do
0
   dot.puts "}"
0
   dot.close
0
   
0
- puts `neato -v -s100 -Tpng graph.dot -O`
0
+ output = ENV['OUTPUT'] ? "-o #{ENV['OUTPUT']}" : '-O'
0
+ puts `neato -s100 -Tpng graph.dot #{output}`
0
 end
0
\ No newline at end of file

Comments

    No one has commented yet.