Skip to content

purcell/dotr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DotR

DotR is a tiny ruby library that makes it easy to construct directed graphs in a variety of graphic formats using the 'dot' utility from the Graphviz suite of programs.

In order to use DotR you must have Graphviz installed. See http://www.graphviz.org for installation instructions and examples of the output that is possible.

For more information or to contact author Steve Purcell, please visit http://dotr.sanityinc.com.

Example

d = DotR::Digraph.new do |g|
  g.node('node1') do |n|
    n.label = "MyLabel"
    n.fontsize="8"
  end
  g.node('node2', :label => 'SecondNode') do |n|
    n.connection('node1', :label => 'relates to')
  end
end

File.open('diagram.png', 'w') { |f| f.write(d.diagram(:png)) }

Resources

Copyright

Copyright (c) 2006 Steve Purcell.

Licence

DotR is distributed under the same terms as Ruby itself.


💝 Support this project and my other Open Source work via Patreon

💼 LinkedIn profile

✍ sanityinc.com

About

Ruby wrapper for the 'dot' utility from graphviz

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages