Sha256: c331adf285c1c5d37b3704c41ad3642fafecc5fc4b36b15124ab0afe4d2a28a4

Contents?: true

Size: 813 Bytes

Versions: 24

Compression:

Stored size: 813 Bytes

Contents

#!/usr/bin/ruby

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

g = nil
if ARGV[0]
  g = GraphViz::new( "G", "path" => ARGV[0] )
else
  g = GraphViz::new( "G" )
end

g.node["shape"] = "ellipse"
g.node["sides"] = "4"
g.node["peripheries"] = ""
g.node["color"] = "black"
g.node["style"] = ""
g.node["skew"] = "0.0"
g.node["distortion"] = "0.0"

a = g.add_node( "a", "shape" => "polygon", "sides" => "5", "peripheries" => "3", "color" => "lightblue", "style" => "filled"  )
b = g.add_node( "b" )
c = g.add_node( "c", "shape" => "polygon", "sides" => "4", "skew" => ".4", "label" => "hello world" )
d = g.add_node( "d", "shape" => "invtriangle" )
e = g.add_node( "e", "shape" => "polygon", "sides" => "4", "distortion" => ".7" )

g.add_edge( a, b )
g.add_edge( b, c )
g.add_edge( b, d )

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

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ruby-graphviz-1.0.2 examples/sample03.rb
ruby-graphviz-1.0.1 examples/sample03.rb
ruby-graphviz-1.0.0 examples/sample03.rb
ruby-graphviz-0.9.21 examples/sample03.rb
ruby-graphviz-0.9.20 examples/sample03.rb
ruby-graphviz-0.9.19 examples/sample03.rb
ruby-graphviz-0.9.18 examples/sample03.rb
ruby-graphviz-0.9.17 examples/sample03.rb
ruby-graphviz-0.9.16 examples/sample03.rb
ruby-graphviz-0.9.15 examples/sample03.rb
ruby-graphviz-0.9.14 examples/sample03.rb
ruby-graphviz-0.9.13 examples/sample03.rb
ruby-graphviz-0.9.12 examples/sample03.rb
ruby-graphviz-0.9.11 examples/sample03.rb
ruby-graphviz-0.9.10 examples/sample03.rb
ruby-graphviz-0.9.9 examples/sample03.rb
ruby-graphviz-0.9.8 examples/sample03.rb
ruby-graphviz-0.9.7 examples/sample03.rb
ruby-graphviz-0.9.6 examples/sample03.rb
ruby-graphviz-0.9.5 examples/sample03.rb