Sha256: b34d276765dd76e9c39b8cb6df9ba2559897ddd44ef18bf9f4c09a1f11973815

Contents?: true

Size: 450 Bytes

Versions: 15

Compression:

Stored size: 450 Bytes

Contents

#!/usr/bin/ruby

$:.unshift( "../lib" );
require "graphviz"

g = GraphViz::new( "G", :type => "graph" )
g[:compound] = true
g[:rankdir] = "LR"

c0 = g.add_graph( "cluster0", "label" => "cluster #1"  )
a0 = c0.add_nodes( "a0" )

c1 = g.add_graph( "cluster1", "label" => "cluster #2" )
b0 = c1.add_nodes( "b0" )

e1 = g.add_edges(a0,b0)
e1[:lhead] = c1.id
e1[:ltail] = c0.id

e2 = g.add_edges(a0,b0)
e2[:lhead] = c1.id

g.output( :png => "#{$0}.png" )

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
ruby-graphviz-1.2.5 examples/sample69.rb
ruby-graphviz-1.2.4 examples/sample69.rb
ruby-graphviz-1.2.3 examples/sample69.rb
ruby-graphviz-1.2.2 examples/sample69.rb
ruby-graphviz-1.2.1 examples/sample69.rb
ruby-graphviz-1.2.0 examples/sample69.rb
ruby-graphviz-1.1.0 examples/sample69.rb
ruby-graphviz_c-1.1.1 examples/sample69.rb
ruby-graphviz_c-1.1.0 examples/sample69.rb
ruby-graphviz-1.0.9 examples/sample69.rb
ruby-graphviz-1.0.8 examples/sample69.rb
ruby-graphviz-1.0.7 examples/sample69.rb
ruby-graphviz-1.0.6 examples/sample69.rb
ruby-graphviz-1.0.5 examples/sample69.rb
ruby-graphviz-1.0.4 examples/sample69.rb