Sha256: acbfe6b99899d7d4b797c4351ea21a9373384300345415c42873e5c6c5f5a8a2

Contents?: true

Size: 589 Bytes

Versions: 2

Compression:

Stored size: 589 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", :output => "png", :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/', :file => "#{$0}.png" )

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-graphviz-0.9.1 examples/sample15.rb
ruby-graphviz-0.9.0 examples/sample15.rb