purcell / dotr

Ruby wrapper for the 'dot' utility from graphviz

This URL has Read+Write access

purcell (author)
Sun Feb 11 06:18:00 -0800 2007
commit  35a70a37ae1d45a98dc690d323cb320ee1adaad7
tree    591aa51eef7bca80e514e049ca3bee5f8448f8da
parent  6a43a3ea4ecb19038fe01b925c169348911282dc
dotr / README
100644 45 lines (29 sloc) 0.966 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
= DotR
 
DotR is a tiny 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
 
Home page
 
* http://dotr.sanityinc.com
 
Graphviz home page and sample output
 
* http://www.graphviz.org
 
== Copyright
 
Copyright (c) 2006 Steve Purcell.
 
== Licence
 
DotR is distributed under the same terms as Ruby itself.