Sha256: 98a22261ec6d87054cedb82347c00ddc0969f50a842f5f7060fe6c56ca468ab2

Contents?: true

Size: 1006 Bytes

Versions: 2

Compression:

Stored size: 1006 Bytes

Contents

#!/usr/bin/ruby

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

GraphViz::new( "G", :output => "png", :rankdir => "LR", :size => "8,5" ) { |graph|
  graph.node[:shape] = "doublecircle"
  graph._LR_0; graph._LR_3; graph._LR_4; graph._LR_8
  graph.node[:shape] = "circle"
  (graph._LR_0 << graph._LR_2)[:label] = "SS(B)"
  (graph._LR_0 << graph._LR_1)[:label] = "SS(S)"
  (graph._LR_1 << graph._LR_3)[:label] = "S($end)"
  (graph._LR_2 << graph._LR_6)[:label] = "SS(b)"
  (graph._LR_2 << graph._LR_5)[:label] = "SS(a)"
  (graph._LR_2 << graph._LR_4)[:label] = "S(A)"
  (graph._LR_5 << graph._LR_7)[:label] = "S(b)"
  (graph._LR_5 << graph._LR_5)[:label] = "S(a)"
  (graph._LR_6 << graph._LR_6)[:label] = "S(b)"
  (graph._LR_6 << graph._LR_5)[:label] = "S(a)"
  (graph._LR_7 << graph._LR_8)[:label] = "S(b)"
  (graph._LR_7 << graph._LR_5)[:label] = "S(a)"
  (graph._LR_8 << graph._LR_6)[:label] = "S(b)"
  (graph._LR_8 << graph._LR_5)[:label] = "S(a)"
}.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/sample18.rb
ruby-graphviz-0.9.0 examples/sample18.rb