luquet-ruby-graphviz 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/AUTHORS +7 -0
  2. data/COPYING +340 -0
  3. data/ChangeLog +66 -0
  4. data/README.rdoc +69 -0
  5. data/bin/ruby2gv +194 -0
  6. data/examples/HTML-Labels.rb +20 -0
  7. data/examples/arrowhead.rb +97 -0
  8. data/examples/dot/cluster.dot +31 -0
  9. data/examples/dot/fsm.dot +20 -0
  10. data/examples/dot/genetic.dot +118 -0
  11. data/examples/dot/hello.dot +1 -0
  12. data/examples/dot/hello_test.rb +14 -0
  13. data/examples/dot/lion_share.dot +103 -0
  14. data/examples/dot/prof.dot +150 -0
  15. data/examples/dot/psg.dot +28 -0
  16. data/examples/dot/sdh.dot +284 -0
  17. data/examples/dot/siblings.dot +492 -0
  18. data/examples/dot/test.dot +17 -0
  19. data/examples/dot/unix.dot +104 -0
  20. data/examples/graphviz.org/TrafficLights.rb +62 -0
  21. data/examples/graphviz.org/cluster.rb +62 -0
  22. data/examples/graphviz.org/hello_world.rb +10 -0
  23. data/examples/graphviz.org/lion_share.rb +215 -0
  24. data/examples/graphviz.org/process.rb +37 -0
  25. data/examples/maketest.sh +85 -0
  26. data/examples/p2p.rb +35 -0
  27. data/examples/sample01.rb +32 -0
  28. data/examples/sample02.rb +42 -0
  29. data/examples/sample03.rb +31 -0
  30. data/examples/sample04.rb +22 -0
  31. data/examples/sample05.rb +32 -0
  32. data/examples/sample06.rb +46 -0
  33. data/examples/sample07.rb +23 -0
  34. data/examples/sample08.rb +34 -0
  35. data/examples/sample09.rb +50 -0
  36. data/examples/sample10.rb +50 -0
  37. data/examples/sample11.rb +42 -0
  38. data/examples/sample12.rb +55 -0
  39. data/examples/sample13.rb +48 -0
  40. data/examples/sample14.rb +44 -0
  41. data/examples/sample15.rb +23 -0
  42. data/examples/sample16.rb +8 -0
  43. data/examples/sample17.rb +92 -0
  44. data/examples/sample18.rb +24 -0
  45. data/examples/sample19.rb +59 -0
  46. data/examples/sample20.rb +47 -0
  47. data/examples/sample21.rb +12 -0
  48. data/examples/sample22.rb +10 -0
  49. data/examples/sample23.rb +11 -0
  50. data/examples/sample24.rb +11 -0
  51. data/examples/sample25.rb +11 -0
  52. data/examples/shapes.rb +24 -0
  53. data/examples/test.xml +26 -0
  54. data/examples/testorder.rb +43 -0
  55. data/examples/testxml.rb +7 -0
  56. data/lib/graphviz.rb +655 -0
  57. data/lib/graphviz/attrs.rb +51 -0
  58. data/lib/graphviz/constants.rb +246 -0
  59. data/lib/graphviz/dot.treetop +97 -0
  60. data/lib/graphviz/edge.rb +130 -0
  61. data/lib/graphviz/node.rb +129 -0
  62. data/lib/graphviz/parser.rb +249 -0
  63. data/lib/graphviz/xml.rb +131 -0
  64. data/setup.rb +1585 -0
  65. metadata +176 -0
@@ -0,0 +1,17 @@
1
+ digraph G {
2
+ fontsize=12;
3
+ node [style=filled ,fontsize=10]; Hello;
4
+ edge[style=dotted];
5
+ graph [ bgcolor = "#ABCDEF"];
6
+
7
+ monde [color=blue, style= filled];
8
+ node[color=white ] ;
9
+ Hello ->World [color=red, style = filled];
10
+ Bonjour-> monde -> Chose;
11
+ Coucou -> "Les Gens" [color=blue];
12
+ subgraph X {
13
+ bgcolor = white;
14
+ label="Sub Graph";
15
+ toto -> titi;
16
+ }
17
+ }
@@ -0,0 +1,104 @@
1
+ digraph "unix" {
2
+ graph [ fontname = "Helvetica-Oblique",
3
+ fontsize = 36,
4
+ label = "\n\n\n\nObject Oriented Graphs\nStephen North, 3/19/93",
5
+ size = "6,6" ];
6
+ node [ shape = polygon,
7
+ sides = 4,
8
+ distortion = "0.0",
9
+ orientation = "0.0",
10
+ skew = "0.0",
11
+ color = white,
12
+ style = filled,
13
+ fontname = "Helvetica-Outline" ];
14
+ "5th Edition" [sides=9, distortion="0.936354", orientation=28, skew="-0.126818", color=salmon2];
15
+ "6th Edition" [sides=5, distortion="0.238792", orientation=11, skew="0.995935", color=deepskyblue];
16
+ "PWB 1.0" [sides=8, distortion="0.019636", orientation=79, skew="-0.440424", color=goldenrod2];
17
+ LSX [sides=9, distortion="-0.698271", orientation=22, skew="-0.195492", color=burlywood2];
18
+ "1 BSD" [sides=7, distortion="0.265084", orientation=26, skew="0.403659", color=gold1];
19
+ "Mini Unix" [distortion="0.039386", orientation=2, skew="-0.461120", color=greenyellow];
20
+ Wollongong [sides=5, distortion="0.228564", orientation=63, skew="-0.062846", color=darkseagreen];
21
+ Interdata [distortion="0.624013", orientation=56, skew="0.101396", color=dodgerblue1];
22
+ "Unix/TS 3.0" [sides=8, distortion="0.731383", orientation=43, skew="-0.824612", color=thistle2];
23
+ "PWB 2.0" [sides=6, distortion="0.592100", orientation=34, skew="-0.719269", color=darkolivegreen3];
24
+ "7th Edition" [sides=10, distortion="0.298417", orientation=65, skew="0.310367", color=chocolate];
25
+ "8th Edition" [distortion="-0.997093", orientation=50, skew="-0.061117", color=turquoise3];
26
+ "32V" [sides=7, distortion="0.878516", orientation=19, skew="0.592905", color=steelblue3];
27
+ V7M [sides=10, distortion="-0.960249", orientation=32, skew="0.460424", color=navy];
28
+ "Ultrix-11" [sides=10, distortion="-0.633186", orientation=10, skew="0.333125", color=darkseagreen4];
29
+ Xenix [sides=8, distortion="-0.337997", orientation=52, skew="-0.760726", color=coral];
30
+ "UniPlus+" [sides=7, distortion="0.788483", orientation=39, skew="-0.526284", color=darkolivegreen3];
31
+ "9th Edition" [sides=7, distortion="0.138690", orientation=55, skew="0.554049", color=coral3];
32
+ "2 BSD" [sides=7, distortion="-0.010661", orientation=84, skew="0.179249", color=blanchedalmond];
33
+ "2.8 BSD" [distortion="-0.239422", orientation=44, skew="0.053841", color=lightskyblue1];
34
+ "2.9 BSD" [distortion="-0.843381", orientation=70, skew="-0.601395", color=aquamarine2];
35
+ "3 BSD" [sides=10, distortion="0.251820", orientation=18, skew="-0.530618", color=lemonchiffon];
36
+ "4 BSD" [sides=5, distortion="-0.772300", orientation=24, skew="-0.028475", color=darkorange1];
37
+ "4.1 BSD" [distortion="-0.226170", orientation=38, skew="0.504053", color=lightyellow1];
38
+ "4.2 BSD" [sides=10, distortion="-0.807349", orientation=50, skew="-0.908842", color=darkorchid4];
39
+ "4.3 BSD" [sides=10, distortion="-0.030619", orientation=76, skew="0.985021", color=lemonchiffon2];
40
+ "Ultrix-32" [distortion="-0.644209", orientation=21, skew="0.307836", color=goldenrod3];
41
+ "PWB 1.2" [sides=7, distortion="0.640971", orientation=84, skew="-0.768455", color=cyan];
42
+ "USG 1.0" [distortion="0.758942", orientation=42, skew="0.039886", color=blue];
43
+ "CB Unix 1" [sides=9, distortion="-0.348692", orientation=42, skew="0.767058", color=firebrick];
44
+ "USG 2.0" [distortion="0.748625", orientation=74, skew="-0.647656", color=chartreuse4];
45
+ "CB Unix 2" [sides=10, distortion="0.851818", orientation=32, skew="-0.020120", color=greenyellow];
46
+ "CB Unix 3" [sides=10, distortion="0.992237", orientation=29, skew="0.256102", color=bisque4];
47
+ "Unix/TS++" [sides=6, distortion="0.545461", orientation=16, skew="0.313589", color=mistyrose2];
48
+ "PDP-11 Sys V" [sides=9, distortion="-0.267769", orientation=40, skew="0.271226", color=cadetblue1];
49
+ "USG 3.0" [distortion="-0.848455", orientation=44, skew="0.267152", color=bisque2];
50
+ "Unix/TS 1.0" [distortion="0.305594", orientation=75, skew="0.070516", color=orangered];
51
+ "TS 4.0" [sides=10, distortion="-0.641701", orientation=50, skew="-0.952502", color=crimson];
52
+ "System V.0" [sides=9, distortion="0.021556", orientation=26, skew="-0.729938", color=darkorange1];
53
+ "System V.2" [sides=6, distortion="0.985153", orientation=33, skew="-0.399752", color=darkolivegreen4];
54
+ "System V.3" [sides=7, distortion="-0.687574", orientation=58, skew="-0.180116", color=lightsteelblue1];
55
+ "5th Edition" -> "6th Edition";
56
+ "5th Edition" -> "PWB 1.0";
57
+ "6th Edition" -> LSX;
58
+ "6th Edition" -> "1 BSD";
59
+ "6th Edition" -> "Mini Unix";
60
+ "6th Edition" -> Wollongong;
61
+ "6th Edition" -> Interdata;
62
+ Interdata -> "Unix/TS 3.0";
63
+ Interdata -> "PWB 2.0";
64
+ Interdata -> "7th Edition";
65
+ "7th Edition" -> "8th Edition";
66
+ "7th Edition" -> "32V";
67
+ "7th Edition" -> V7M;
68
+ "7th Edition" -> "Ultrix-11";
69
+ "7th Edition" -> Xenix;
70
+ "7th Edition" -> "UniPlus+";
71
+ V7M -> "Ultrix-11";
72
+ "8th Edition" -> "9th Edition";
73
+ "1 BSD" -> "2 BSD";
74
+ "2 BSD" -> "2.8 BSD";
75
+ "2.8 BSD" -> "Ultrix-11";
76
+ "2.8 BSD" -> "2.9 BSD";
77
+ "32V" -> "3 BSD";
78
+ "3 BSD" -> "4 BSD";
79
+ "4 BSD" -> "4.1 BSD";
80
+ "4.1 BSD" -> "4.2 BSD";
81
+ "4.1 BSD" -> "2.8 BSD";
82
+ "4.1 BSD" -> "8th Edition";
83
+ "4.2 BSD" -> "4.3 BSD";
84
+ "4.2 BSD" -> "Ultrix-32";
85
+ "PWB 1.0" -> "PWB 1.2";
86
+ "PWB 1.0" -> "USG 1.0";
87
+ "PWB 1.2" -> "PWB 2.0";
88
+ "USG 1.0" -> "CB Unix 1";
89
+ "USG 1.0" -> "USG 2.0";
90
+ "CB Unix 1" -> "CB Unix 2";
91
+ "CB Unix 2" -> "CB Unix 3";
92
+ "CB Unix 3" -> "Unix/TS++";
93
+ "CB Unix 3" -> "PDP-11 Sys V";
94
+ "USG 2.0" -> "USG 3.0";
95
+ "USG 3.0" -> "Unix/TS 3.0";
96
+ "PWB 2.0" -> "Unix/TS 3.0";
97
+ "Unix/TS 1.0" -> "Unix/TS 3.0";
98
+ "Unix/TS 3.0" -> "TS 4.0";
99
+ "Unix/TS++" -> "TS 4.0";
100
+ "CB Unix 3" -> "TS 4.0";
101
+ "TS 4.0" -> "System V.0";
102
+ "System V.0" -> "System V.2";
103
+ "System V.2" -> "System V.3";
104
+ }
@@ -0,0 +1,62 @@
1
+ # http://www.graphviz.org/Gallery/directed/traffic_lights.gv.txt
2
+ #
3
+ # digraph TrafficLights {
4
+ # node [shape=box]; gy2; yr2; rg2; gy1; yr1; rg1;
5
+ # node [shape=circle,fixedsize=true,width=0.9]; green2; yellow2; red2; safe2; safe1; green1; yellow1; red1;
6
+ # gy2->yellow2;
7
+ # rg2->green2;
8
+ # yr2->safe1;
9
+ # yr2->red2;
10
+ # safe2->rg2;
11
+ # green2->gy2;
12
+ # yellow2->yr2;
13
+ # red2->rg2;
14
+ # gy1->yellow1;
15
+ # rg1->green1;
16
+ # yr1->safe2;
17
+ # yr1->red1;
18
+ # safe1->rg1;
19
+ # green1->gy1;
20
+ # yellow1->yr1;
21
+ # red1->rg1;
22
+ #
23
+ # overlap=false
24
+ # label="PetriNet Model TrafficLights\nExtracted from ConceptBase and layed out by Graphviz"
25
+ # fontsize=12;
26
+ # }
27
+
28
+ $:.unshift( "../../lib" );
29
+ require "graphviz"
30
+
31
+ GraphViz::new( "TrafficLights", :type => :digraph ) { |g|
32
+ g.gy2[:shape] = :box; g.yr2[:shape] = :box; g.rg2[:shape] = :box; g.gy1[:shape] = :box; g.yr1[:shape] = :box; g.rg1[:shape] = :box;
33
+ g.green2.set { |n| n[:shape] = :circle; n[:fixedsize] = :true; n[:width] = 0.9 }
34
+ g.yellow2.set { |n| n[:shape] = :circle; n[:fixedsize] = :true; n[:width] = 0.9 }
35
+ g.red2.set { |n| n[:shape] = :circle; n[:fixedsize] = :true; n[:width] = 0.9 }
36
+ g.safe2.set { |n| n[:shape] = :circle; n[:fixedsize] = :true; n[:width] = 0.9 }
37
+ g.safe1.set { |n| n[:shape] = :circle; n[:fixedsize] = :true; n[:width] = 0.9 }
38
+ g.green1.set { |n| n[:shape] = :circle; n[:fixedsize] = :true; n[:width] = 0.9 }
39
+ g.yellow1.set { |n| n[:shape] = :circle; n[:fixedsize] = :true; n[:width] = 0.9 }
40
+ g.red1.set { |n| n[:shape] = :circle; n[:fixedsize] = :true; n[:width] = 0.9 }
41
+
42
+ g.gy2 << g.yellow2
43
+ g.rg2 << g.green2
44
+ g.yr2 << g.safe1
45
+ g.yr2 << g.red2
46
+ g.safe2 << g.rg2
47
+ g.green2 << g.gy2
48
+ g.yellow2 << g.yr2
49
+ g.red2 << g.rg2
50
+ g.gy1 << g.yellow1
51
+ g.rg1 << g.green1
52
+ g.yr1 << g.safe2
53
+ g.yr1 << g.red1
54
+ g.safe1 << g.rg1
55
+ g.green1 << g.gy1
56
+ g.yellow1 << g.yr1
57
+ g.red1 << g.rg1
58
+
59
+ g[:overlap] = :false
60
+ g[:label] = 'PetriNet Model TrafficLights\nExtracted from ConceptBase and layed out by Graphviz'
61
+ g[:fontsize] = 12;
62
+ }.output( :errors => 1, :png => "TrafficLights.png" )
@@ -0,0 +1,62 @@
1
+ # http://www.graphviz.org/Gallery/directed/cluster.html
2
+ #
3
+ # digraph G {
4
+ #
5
+ # subgraph cluster_0 {
6
+ # style=filled;
7
+ # color=lightgrey;
8
+ # node [style=filled,color=white];
9
+ # a0 -> a1 -> a2 -> a3;
10
+ # label = "process #1";
11
+ # }
12
+ #
13
+ # subgraph cluster_1 {
14
+ # node [style=filled];
15
+ # b0 -> b1 -> b2 -> b3;
16
+ # label = "process #2";
17
+ # color=blue
18
+ # }
19
+ # start -> a0;
20
+ # start -> b0;
21
+ # a1 -> b3;
22
+ # b2 -> a3;
23
+ # a3 -> a0;
24
+ # a3 -> end;
25
+ # b3 -> end;
26
+ #
27
+ # start [shape=Mdiamond];
28
+ # end [shape=Msquare];
29
+ # }
30
+
31
+ $:.unshift( "../../lib" );
32
+ require "graphviz"
33
+
34
+ GraphViz.new( :G, :type => :digraph ) { |g|
35
+ g.cluster_0 { |c|
36
+ c[:style] = :filled
37
+ c[:color] = :lightgrey
38
+ c.node[:style] = :filled
39
+ c.node[:color] = :white
40
+ c.a0 << c.a1 << c.a2 << c.a3
41
+ c[:label] = "process #1"
42
+ }
43
+
44
+ g.cluster_1 { |c|
45
+ c.node[:style] = :filled
46
+ c.b0 << c.b1 << c.b2 << c.b3
47
+ c[:label] = "process #1"
48
+ c[:color] = :blue
49
+ }
50
+
51
+ g.start << g.cluster_0.a0
52
+ g.start << g.cluster_1.b0
53
+ g.cluster_0.a1 << g.cluster_1.b3
54
+ g.cluster_1.b2 << g.cluster_0.a3
55
+ g.cluster_0.a3 << g.cluster_0.a0
56
+ g.cluster_0.a3 << g._end
57
+ g.cluster_1.b3 << g._end
58
+
59
+ g.start[:shape] = :Mdiamond
60
+ g._end[:label] = "end"
61
+ g._end[:shape] = :Mdiamond
62
+ }.output( :png => "cluster.png" )
@@ -0,0 +1,10 @@
1
+ # http://www.graphviz.org/Gallery/directed/hello.html
2
+ #
3
+ # digraph G {Hello->World}
4
+
5
+ $:.unshift( "../../lib" );
6
+ require "graphviz"
7
+
8
+ GraphViz::new( :G, :type => :digraph ) { |g|
9
+ g.world( :label => "World" ) << g.hello( :label => "Hello" )
10
+ }.output( :png => "hello.png" )
@@ -0,0 +1,215 @@
1
+ # http://www.graphviz.org/Gallery/directed/lion_share.html
2
+ #
3
+ # digraph Ped_Lion_Share {
4
+ # # page = "8.2677165,11.692913" ;
5
+ # ratio = "auto" ;
6
+ # mincross = 2.0 ;
7
+ # label = "Pedigree Lion_Share" ;
8
+ #
9
+ # "001" [shape=box , regular=1,style=filled,fillcolor=white ] ;
10
+ # "002" [shape=box , regular=1,style=filled,fillcolor=white ] ;
11
+ # "003" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
12
+ # "004" [shape=box , regular=1,style=filled,fillcolor=white ] ;
13
+ # "005" [shape=box , regular=1,style=filled,fillcolor=white ] ;
14
+ # "006" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
15
+ # "007" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
16
+ # "009" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
17
+ # "014" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
18
+ # "015" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
19
+ # "016" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
20
+ # "ZZ01" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
21
+ # "ZZ02" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
22
+ # "017" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
23
+ # "012" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
24
+ # "008" [shape=box , regular=1,style=filled,fillcolor=white ] ;
25
+ # "011" [shape=box , regular=1,style=filled,fillcolor=white ] ;
26
+ # "013" [shape=box , regular=1,style=filled,fillcolor=white ] ;
27
+ # "010" [shape=box , regular=1,style=filled,fillcolor=white ] ;
28
+ # "023" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
29
+ # "020" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
30
+ # "021" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
31
+ # "018" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
32
+ # "025" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
33
+ # "019" [shape=box , regular=1,style=filled,fillcolor=white ] ;
34
+ # "022" [shape=box , regular=1,style=filled,fillcolor=white ] ;
35
+ # "024" [shape=box , regular=1,style=filled,fillcolor=white ] ;
36
+ # "027" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
37
+ # "026" [shape=box , regular=1,style=filled,fillcolor=white ] ;
38
+ # "028" [shape=box , regular=1,style=filled,fillcolor=grey ] ;
39
+ # "marr0001" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
40
+ # "001" -> "marr0001" [dir=none,weight=1] ;
41
+ # "007" -> "marr0001" [dir=none,weight=1] ;
42
+ # "marr0001" -> "017" [dir=none, weight=2] ;
43
+ # "marr0002" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
44
+ # "001" -> "marr0002" [dir=none,weight=1] ;
45
+ # "ZZ02" -> "marr0002" [dir=none,weight=1] ;
46
+ # "marr0002" -> "012" [dir=none, weight=2] ;
47
+ # "marr0003" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
48
+ # "002" -> "marr0003" [dir=none,weight=1] ;
49
+ # "003" -> "marr0003" [dir=none,weight=1] ;
50
+ # "marr0003" -> "008" [dir=none, weight=2] ;
51
+ # "marr0004" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
52
+ # "002" -> "marr0004" [dir=none,weight=1] ;
53
+ # "006" -> "marr0004" [dir=none,weight=1] ;
54
+ # "marr0004" -> "011" [dir=none, weight=2] ;
55
+ # "marr0005" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
56
+ # "002" -> "marr0005" [dir=none,weight=1] ;
57
+ # "ZZ01" -> "marr0005" [dir=none,weight=1] ;
58
+ # "marr0005" -> "013" [dir=none, weight=2] ;
59
+ # "marr0006" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
60
+ # "004" -> "marr0006" [dir=none,weight=1] ;
61
+ # "009" -> "marr0006" [dir=none,weight=1] ;
62
+ # "marr0006" -> "010" [dir=none, weight=2] ;
63
+ # "marr0007" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
64
+ # "005" -> "marr0007" [dir=none,weight=1] ;
65
+ # "015" -> "marr0007" [dir=none,weight=1] ;
66
+ # "marr0007" -> "023" [dir=none, weight=2] ;
67
+ # "marr0008" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
68
+ # "005" -> "marr0008" [dir=none,weight=1] ;
69
+ # "016" -> "marr0008" [dir=none,weight=1] ;
70
+ # "marr0008" -> "020" [dir=none, weight=2] ;
71
+ # "marr0009" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
72
+ # "005" -> "marr0009" [dir=none,weight=1] ;
73
+ # "012" -> "marr0009" [dir=none,weight=1] ;
74
+ # "marr0009" -> "021" [dir=none, weight=2] ;
75
+ # "marr0010" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
76
+ # "008" -> "marr0010" [dir=none,weight=1] ;
77
+ # "017" -> "marr0010" [dir=none,weight=1] ;
78
+ # "marr0010" -> "018" [dir=none, weight=2] ;
79
+ # "marr0011" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
80
+ # "011" -> "marr0011" [dir=none,weight=1] ;
81
+ # "023" -> "marr0011" [dir=none,weight=1] ;
82
+ # "marr0011" -> "025" [dir=none, weight=2] ;
83
+ # "marr0012" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
84
+ # "013" -> "marr0012" [dir=none,weight=1] ;
85
+ # "014" -> "marr0012" [dir=none,weight=1] ;
86
+ # "marr0012" -> "019" [dir=none, weight=2] ;
87
+ # "marr0013" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
88
+ # "010" -> "marr0013" [dir=none,weight=1] ;
89
+ # "021" -> "marr0013" [dir=none,weight=1] ;
90
+ # "marr0013" -> "022" [dir=none, weight=2] ;
91
+ # "marr0014" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
92
+ # "019" -> "marr0014" [dir=none,weight=1] ;
93
+ # "020" -> "marr0014" [dir=none,weight=1] ;
94
+ # "marr0014" -> "024" [dir=none, weight=2] ;
95
+ # "marr0015" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
96
+ # "022" -> "marr0015" [dir=none,weight=1] ;
97
+ # "025" -> "marr0015" [dir=none,weight=1] ;
98
+ # "marr0015" -> "027" [dir=none, weight=2] ;
99
+ # "marr0016" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
100
+ # "024" -> "marr0016" [dir=none,weight=1] ;
101
+ # "018" -> "marr0016" [dir=none,weight=1] ;
102
+ # "marr0016" -> "026" [dir=none, weight=2] ;
103
+ # "marr0017" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
104
+ # "026" -> "marr0017" [dir=none,weight=1] ;
105
+ # "027" -> "marr0017" [dir=none,weight=1] ;
106
+ # "marr0017" -> "028" [dir=none, weight=2] ;
107
+ # }
108
+
109
+ $:.unshift( "../../lib" );
110
+ require "graphviz"
111
+
112
+ GraphViz::new( "Ped_Lion_Share", :type => :digraph ) { |g|
113
+ g[:ratio] = :auto
114
+ # g[:mincross] = 2.0
115
+ g[:label] = "Pedigree Lion_Share"
116
+
117
+ g._001.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "001" }
118
+ g._002.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "002" }
119
+ g._003.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "003" }
120
+ g._004.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "004" }
121
+ g._005.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "005" }
122
+ g._006.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "006" }
123
+ g._007.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "007" }
124
+ g._009.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "009" }
125
+ g._014.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "014" }
126
+ g._015.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "015" }
127
+ g._016.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "016" }
128
+ g.ZZ01.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white }
129
+ g.ZZ02.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white }
130
+ g._017.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "017" }
131
+ g._012.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "012" }
132
+ g._008.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "008" }
133
+ g._011.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "011" }
134
+ g._013.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "013" }
135
+ g._010.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "010" }
136
+ g._023.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "023" }
137
+ g._020.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "020" }
138
+ g._021.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "021" }
139
+ g._018.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "018" }
140
+ g._025.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "025" }
141
+ g._019.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "019" }
142
+ g._022.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "022" }
143
+ g._024.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "024" }
144
+ g._027.set { |n| n[:shape] = :circle; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "027" }
145
+ g._026.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :white; n[:label] = "026" }
146
+ g._028.set { |n| n[:shape] = :box; n[:regular] = 1; n[:style] = :filled; n[:fillcolor] = :grey; n[:label] = "028" }
147
+ g.marr0001.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
148
+ (g._001 << g.marr0001).set { |e| e[:dir] = :none; e[:weight] = 1 }
149
+ (g._007 << g.marr0001).set { |e| e[:dir] = :none; e[:weight] = 1 }
150
+ (g.marr0001 << g._017).set { |e| e[:dir] = :none; e[:weight] = 2 }
151
+ g.marr0002.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
152
+ (g._001 << g.marr0002).set { |e| e[:dir] = :none; e[:weight] = 1 }
153
+ (g.ZZ02 << g.marr0002).set { |e| e[:dir] = :none; e[:weight] = 1 }
154
+ (g.marr0002 << g._012).set { |e| e[:dir] = :none; e[:weight] = 2 }
155
+ g.marr0003.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
156
+ (g._002 << g.marr0003).set { |e| e[:dir] = :none; e[:weight] = 1 }
157
+ (g._003 << g.marr0003).set { |e| e[:dir] = :none; e[:weight] = 1 }
158
+ (g.marr0003 << g._008).set { |e| e[:dir] = :none; e[:weight] = 2 }
159
+ g.marr0004.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
160
+ (g._002 << g.marr0004).set { |e| e[:dir] = :none; e[:weight] = 1 }
161
+ (g._006 << g.marr0004).set { |e| e[:dir] = :none; e[:weight] = 1 }
162
+ (g.marr0004 << g._011).set { |e| e[:dir] = :none; e[:weight] = 2 }
163
+ g.marr0005.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
164
+ (g._002 << g.marr0005).set { |e| e[:dir] = :none; e[:weight] = 1 }
165
+ (g.ZZ01 << g.marr0005).set { |e| e[:dir] = :none; e[:weight] = 1 }
166
+ (g.marr0005 << g._013).set { |e| e[:dir] = :none; e[:weight] = 2 }
167
+ g.marr0006.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
168
+ (g._004 << g.marr0006).set { |e| e[:dir] = :none; e[:weight] = 1 }
169
+ (g._009 << g.marr0006).set { |e| e[:dir] = :none; e[:weight] = 1 }
170
+ (g.marr0006 << g._010).set { |e| e[:dir] = :none; e[:weight] = 2 }
171
+ g.marr0007.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
172
+ (g._005 << g.marr0007).set { |e| e[:dir] = :none; e[:weight] = 1 }
173
+ (g._015 << g.marr0007).set { |e| e[:dir] = :none; e[:weight] = 1 }
174
+ (g.marr0007 << g._023).set { |e| e[:dir] = :none; e[:weight] = 2 }
175
+ g.marr0008.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
176
+ (g._005 << g.marr0008).set { |e| e[:dir] = :none; e[:weight] = 1 }
177
+ (g._016 << g.marr0008).set { |e| e[:dir] = :none; e[:weight] = 1 }
178
+ (g.marr0008 << g._020).set { |e| e[:dir] = :none; e[:weight] = 2 }
179
+ g.marr0009.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
180
+ (g._005 << g.marr0009).set { |e| e[:dir] = :none; e[:weight] = 1 }
181
+ (g._012 << g.marr0009).set { |e| e[:dir] = :none; e[:weight] = 1 }
182
+ (g.marr0009 << g._021).set { |e| e[:dir] = :none; e[:weight] = 2 }
183
+ g.marr0010.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
184
+ (g._008 << g.marr0010).set { |e| e[:dir] = :none; e[:weight] = 1 }
185
+ (g._017 << g.marr0010).set { |e| e[:dir] = :none; e[:weight] = 1 }
186
+ (g.marr0010 << g._018).set { |e| e[:dir] = :none; e[:weight] = 2 }
187
+ g.marr0011.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
188
+ (g._011 << g.marr0011).set { |e| e[:dir] = :none; e[:weight] = 1 }
189
+ (g._023 << g.marr0011).set { |e| e[:dir] = :none; e[:weight] = 1 }
190
+ (g.marr0011 << g._025).set { |e| e[:dir] = :none; e[:weight] = 2 }
191
+ g.marr0012.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
192
+ (g._013 << g.marr0012).set { |e| e[:dir] = :none; e[:weight] = 1 }
193
+ (g._014 << g.marr0012).set { |e| e[:dir] = :none; e[:weight] = 1 }
194
+ (g.marr0012 << g._019).set { |e| e[:dir] = :none; e[:weight] = 2 }
195
+ g.marr0013.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
196
+ (g._010 << g.marr0013).set { |e| e[:dir] = :none; e[:weight] = 1 }
197
+ (g._021 << g.marr0013).set { |e| e[:dir] = :none; e[:weight] = 1 }
198
+ (g.marr0013 << g._022).set { |e| e[:dir] = :none; e[:weight] = 2 }
199
+ g.marr0014.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
200
+ (g._019 << g.marr0014).set { |e| e[:dir] = :none; e[:weight] = 1 }
201
+ (g._020 << g.marr0014).set { |e| e[:dir] = :none; e[:weight] = 1 }
202
+ (g.marr0014 << g._024).set { |e| e[:dir] = :none; e[:weight] = 2 }
203
+ g.marr0015.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
204
+ (g._022 << g.marr0015).set { |e| e[:dir] = :none; e[:weight] = 1 }
205
+ (g._025 << g.marr0015).set { |e| e[:dir] = :none; e[:weight] = 1 }
206
+ (g.marr0015 << g._027).set { |e| e[:dir] = :none; e[:weight] = 2 }
207
+ g.marr0016.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
208
+ (g._024 << g.marr0016).set { |e| e[:dir] = :none; e[:weight] = 1 }
209
+ (g._018 << g.marr0016).set { |e| e[:dir] = :none; e[:weight] = 1 }
210
+ (g.marr0016 << g._026).set { |e| e[:dir] = :none; e[:weight] = 2 }
211
+ g.marr0017.set { |n| n[:shape] = :diamond; n[:style] = :filled; n[:label] = ""; n[:height] = 0.1; n[:width] = 0.1 }
212
+ (g._026 << g.marr0017).set { |e| e[:dir] = :none; e[:weight] = 1 }
213
+ (g._027 << g.marr0017).set { |e| e[:dir] = :none; e[:weight] = 1 }
214
+ (g.marr0017 << g._028).set { |e| e[:dir] = :none; e[:weight] = 2 }
215
+ }.output( :png => "lion_share.png" )