Sha256: 2a83cc61eee9726bb862c212057744a23df552d8a4b2915d8427e1a2e4e13aef

Contents?: true

Size: 570 Bytes

Versions: 24

Compression:

Stored size: 570 Bytes

Contents

#!/usr/bin/ruby

# fdp example 
# see : http://www.graphviz.org/Gallery/undirected/fdpclust.html

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

GraphViz::new( "G", :type => "graph", :use => "fdp" ) { |graph|
  graph.e
  graph.clusterA { |cA|
    cA.a << cA.b
    cA.clusterC { |cC|
      cC._c( :label => "C" ) << cC._d( :label => "D" )
    }
  }
  graph.clusterB { |cB|
    cB.d << cB.f
  }
  graph.clusterB.d << graph.clusterA.clusterC._d
  graph.e << graph.clusterB
  graph.clusterA.clusterC << graph.clusterB
}.output( :path => '/usr/local/bin/', :png => "#{$0}.png" )

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ruby-graphviz-0.9.5 examples/sample15.rb
ruby-graphviz-0.9.4 examples/sample15.rb
ruby-graphviz-0.9.3 examples/sample15.rb
ruby-graphviz-0.9.2 examples/sample15.rb