chiark / gitweb /
Improve graph layouts a bit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 8 Sep 2009 16:11:17 +0000 (17:11 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 Sep 2009 16:11:17 +0000 (17:11 +0100)
yarrg/ocean-topology-graph

index 55d15d97e8f5b20d530360c1fde16144cbea77f9..e609e35778188dc147390cd3a451dc315c95da62 100755 (executable)
@@ -20,7 +20,9 @@ $dbh->disconnect();
 #print Dumper($results);
 
 print "strict graph $ocean {\n";
-#print "    nodesep=10;\n";
+print "    splines=true;\n";
+print "    nslimit=10;\n";
+print "    mclimit=10;\n";
 
 foreach my $row (@$islands) {
     my ($id,$str) = @$row;
@@ -29,8 +31,8 @@ foreach my $row (@$islands) {
 }
 foreach my $row (@$routes) {
     my ($ia,$ib,$dist) = @$row;
-    print "    n$ia -- n$ib [ len=2, label=$dist ];\n";
-    #len=$dist, minlen=$dist, weight=".(1.0/$dist).", len=".($dist*0.25+1).",
+    print "    n$ia -- n$ib [ w=".(1.0/($dist*$dist)).", len=".(0.5*$dist+1).", label=$dist ];\n";
+    #len=$dist, minlen=$dist, ,
     #w=".(1.0/$dist).", 
 }