def write_to_graphic_file (fmt='png', dotfile='graph', params = {})
      src = dotfile + ".dot"
      dot = dotfile + "." + fmt

      File.open(src, 'w') do |f|
        f << self.to_dot_graph(params).to_s << "\n"
      end

      system( "dot -T#{fmt} -o #{dot} #{src}" )
      dot
    end
def write_to_graphic_file (fmt='png', dotfile='graph', params = {})
      src = dotfile + ".dot"
      dot = dotfile + "." + fmt

      File.open(src, 'w') do |f|
        f << self.to_dot_graph(params).to_s << "\n"
      end

      system( "dot -T#{fmt} -o #{dot} #{src}" )
      dot
    end
Use dot[http://www.graphviz.org] to create a graphical representation of
 the graph.  Returns the filename of the graphics file.