https://github.com/glejeune/Ruby-Graphviz
[MIRROR] Ruby interface to the GraphViz graphing tool
https://github.com/glejeune/Ruby-Graphviz
Keywords from Contributors
activejob activerecord mvc rubygems rspec rubocop deployment rdoc devise ruby-documentation
Last synced: about 15 hours ago
JSON representation
Repository metadata
[MIRROR] Ruby interface to the GraphViz graphing tool
- Host: GitHub
- URL: https://github.com/glejeune/Ruby-Graphviz
- Owner: glejeune
- License: other
- Created: 2009-08-02T13:01:42.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2025-03-16T07:54:02.000Z (12 months ago)
- Last Synced: 2026-02-20T21:42:41.803Z (11 days ago)
- Language: Ruby
- Homepage: https://gitlab.com/glejeune/ruby-graphviz
- Size: 21.4 MB
- Stars: 617
- Watchers: 20
- Forks: 118
- Open Issues: 41
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING.md
README.md
Ruby/GraphViz
Copyright (C) 2004-2018 Gregoire Lejeune
- Doc : http://rdoc.info/projects/glejeune/Ruby-Graphviz
- Sources : https://github.com/glejeune/Ruby-Graphviz
- On Rubygems: https://rubygems.org/gems/ruby-graphviz
INSTALLATION
Add this line to your application's Gemfile:
gem 'ruby-graphviz'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ruby-graphviz
DESCRIPTION
Interface to the GraphViz graphing tool
TODO
- New FamilyTree
SYNOPSIS
A basic example
require 'ruby-graphviz'
# Create a new graph
g = GraphViz.new( :G, :type => :digraph )
# Create two nodes
hello = g.add_nodes( "Hello" )
world = g.add_nodes( "World" )
# Create an edge between the two nodes
g.add_edges( hello, world )
# Generate output image
g.output( :png => "hello_world.png" )
The same but with a block
require 'ruby-graphviz'
GraphViz::new( :G, :type => :digraph ) { |g|
g.world( :label => "World" ) << g.hello( :label => "Hello" )
}.output( :png => "hello_world.png" )
Or with the DSL
require 'ruby-graphviz/dsl'
digraph :G do
world[:label => "World"] << hello[:label => "Hello"]
output :png => "hello_world.png"
end
Create a graph from a file
require 'ruby-graphviz'
# In this example, hello.dot is :
# digraph G {Hello->World;}
GraphViz.parse( "hello.dot", :path => "/usr/local/bin" ) { |g|
g.get_node("Hello") { |n|
n[:label] = "Bonjour"
}
g.get_node("World") { |n|
n[:label] = "Le Monde"
}
}.output(:png => "sample.png")
GraphML support
require 'ruby-graphviz/graphml'
g = GraphViz::GraphML.new( "graphml/cluster.graphml" )
g.graph.output( :path => "/usr/local/bin", :png => "#{$0}.png" )
TOOLS
Ruby/GraphViz also includes :
ruby2gv, a simple tool that allows you to create a dependency graph from a ruby script. Example : http://drp.ly/dShaZ
ruby2gv -Tpng -oruby2gv.png ruby2gv
gem2gv, a tool that allows you to create a dependency graph between gems. Example : http://drp.ly/dSj9Y
gem2gv -Tpng -oruby-graphviz.png ruby-graphviz
dot2ruby, a tool that allows you to create a ruby script from a graphviz script
$ cat hello.dot
digraph G {Hello->World;}
$ dot2ruby hello.dot
# This code was generated by dot2ruby.g
require 'rubygems'
require 'ruby-graphviz'
graph_g = GraphViz.digraph( "G" ) { |graph_g|
graph_g[:bb] = '0,0,70,108'
node_hello = graph_g.add_nodes( "Hello", :height => '0.5', :label => '\N', :pos => '35,90', :width => '0.88889' )
graph_g.add_edges( "Hello", "World", :pos => 'e,35,36.413 35,71.831 35,64.131 35,54.974 35,46.417' )
node_world = graph_g.add_nodes( "World", :height => '0.5', :label => '\N', :pos => '35,18', :width => '0.97222' )
}
puts graph_g.output( :canon => String )
-
git2gv, a tool that allows you to show your git commits -
xml2gv, a tool that allows you to show a xml file as graph.
GRAPH THEORY
require 'ruby-graphviz'
require 'ruby-graphviz/theory'
g = GraphViz.new( :G ) { ... }
t = GraphViz::Theory.new( g )
puts "Adjancy matrix : "
puts t.adjancy_matrix
puts "Symmetric ? #{t.symmetric?}"
puts "Incidence matrix :"
puts t.incidence_matrix
g.each_node do |name, node|
puts "Degree of node `#{name}' = #{t.degree(node)}"
end
puts "Laplacian matrix :"
puts t.laplacian_matrix
puts "Dijkstra between a and f"
r = t.moore_dijkstra(g.a, g.f)
if r.nil?
puts "No way !"
else
print "\tPath : "; p r[:path]
puts "\tDistance : #{r[:distance]}"
end
print "Ranges : "
rr = t.range
p rr
puts "Your graph contains circuits" if rr.include?(nil)
puts "Critical path : "
rrr = t.critical_path
print "\tPath "; p rrr[:path]
puts "\tDistance : #{rrr[:distance]}"
INSTALLATION
sudo gem install ruby-graphviz
You also need to install GraphViz
On Windows you also need to install win32-open3. This is not an absolute
requirement.
LICENCES
Ruby/GraphViz
Ruby/GraphViz is freely distributable according to the terms of the GNU
General Public License (see the file 'COPYING').
This program is distributed without any warranty. See the file 'COPYING' for
details.
GNU General Public Licence: https://en.wikipedia.org/wiki/Gpl
nothugly.xsl
By Vidar Hokstad and Ryan Shea; Contributions by Jonas Tingborn, Earl
Cummings, Michael Kennedy (Graphviz 2.20.2 compatibility, bug fixes, testing,
lots of gradients)
Copyright (c) 2009 Vidar Hokstad
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT license: https://en.wikipedia.org/wiki/MIT_License
Contributors
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Owner metadata
- Name: Gregoire Lejeune
- Login: glejeune
- Email:
- Kind: user
- Description:
- Website: https://gitlab.com/glejeune
- Location: Issy-Les-Moulineaux / France
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/15168?v=4
- Repositories: 87
- Last ynced at: 2023-04-10T01:09:06.218Z
- Profile URL: https://github.com/glejeune
GitHub Events
Total
- Pull request event: 4
- Fork event: 2
- Issues event: 1
- Watch event: 9
- Issue comment event: 2
- Push event: 1
- Pull request review event: 2
- Commit comment event: 1
Last Year
- Pull request event: 2
- Fork event: 1
- Watch event: 3
- Issue comment event: 2
- Push event: 1
- Pull request review event: 2
- Commit comment event: 1
Committers metadata
Last synced: about 17 hours ago
Total Commits: 439
Total Committers: 39
Avg Commits per committer: 11.256
Development Distribution Score (DDS): 0.267
Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| glejeune | g****e@f****r | 322 |
| greg | g****g@c****l | 18 |
| Markus Hauck | m****9@g****m | 10 |
| Khalil Fazal | k****l@u****t | 9 |
| oupo | o****i@g****m | 9 |
| Kenichi Kamiya | k****1@g****m | 8 |
| David Rodríguez | d****z@r****t | 7 |
| Neven Has | n****s@g****m | 5 |
| Andrew Kvalheim | A****w@K****m | 4 |
| Oliver Bruening | o****g@y****m | 4 |
| dznz | k****8@s****m | 4 |
| Guilherme Simoes | g****s@g****m | 3 |
| Orel Sokolov | o****v@g****m | 3 |
| Joao Guilherme Zeni | z****j@i****r | 2 |
| Gabe Kopley | g****e@c****m | 2 |
| Dave Burt | d****t@a****u | 2 |
| Jake Goulding | s****r@m****m | 2 |
| Larry Reaves | r****l@l****m | 2 |
| hirochachacha | h****a@g****m | 2 |
| ronen barzel | r****n@b****g | 2 |
| moracca | m****a@g****m | 1 |
| coding46 | c****g@4****e | 1 |
| Villu Orav | v****v | 1 |
| Joao Sa | j****a@i****r | 1 |
| Rolf Timmermans | r****s@v****m | 1 |
| TPei | 4****i | 1 |
| Stefan Huber | m****r@g****m | 1 |
| SHIBATA Hiroshi | h****t@r****g | 1 |
| Robert Reiz | r****1@g****m | 1 |
| Postmodern | p****3@g****m | 1 |
| and 9 more... | ||
Committer domains:
- josephholsten.com: 1
- nathanmlong.com: 1
- ruby-lang.org: 1
- voormedia.com: 1
- innvent.com.br: 1
- 46halbe.de: 1
- barzel.org: 1
- leidos.com: 1
- mac.com: 1
- allori.edu.au: 1
- coshx.com: 1
- imag.fr: 1
- snkmail.com: 1
- kvalhe.im: 1
- riseup.net: 1
- uoit.net: 1
- free.fr: 1
Issue and Pull Request metadata
Last synced: 19 days ago
Total issues: 44
Total pull requests: 65
Average time to close issues: over 1 year
Average time to close pull requests: 3 months
Total issue authors: 41
Total pull request authors: 48
Average comments per issue: 1.59
Average comments per pull request: 0.78
Merged pull request: 41
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 1
Past year pull request authors: 2
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- alxx (2)
- ioquatix (2)
- mooreniemi (2)
- courtneymiller2010 (1)
- andresgutgon (1)
- n-rodriguez (1)
- hedgehog (1)
- tmzhuang (1)
- dorneanu (1)
- taketo1113 (1)
- tetraf (1)
- roolo (1)
- beingmattlevy (1)
- nathanl (1)
- ftaebi (1)
Top Pull Request Authors
- deivid-rodriguez (4)
- markus1189 (4)
- jqr (3)
- guilhermesimoes (2)
- dznz (2)
- kachick (2)
- yuuu (2)
- khalilfazal (2)
- ghost (2)
- ronen (2)
- seuros (2)
- shepmaster (2)
- yrral86 (1)
- josephholsten (1)
- miketheman (1)
Top Issue Labels
- Bug (3)
- Improvement (3)
- Question (3)
- Resolved (2)
- Unreproducible (1)
- New Feature (1)
Top Pull Request Labels
- Improvement (2)
Package metadata
- Total packages: 15
-
Total downloads:
- rubygems: 131,933,334 total
- Total docker downloads: 28,932,620
- Total dependent packages: 166 (may contain duplicates)
- Total dependent repositories: 8,095 (may contain duplicates)
- Total versions: 144
- Total maintainers: 5
gem.coop: ruby-graphviz
Ruby/Graphviz provides an interface to layout and generate images of directed graphs in a variety of formats (PostScript, PNG, etc.) using GraphViz.
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Documentation: http://www.rubydoc.info/gems/ruby-graphviz/
- Licenses: GPL-2.0
- Latest release: 1.2.5 (published almost 6 years ago)
- Last Synced: 2026-03-02T11:31:33.815Z (1 day ago)
- Versions: 43
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 65,960,659 Total
- Docker Downloads: 14,466,310
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.369%
- Downloads: 0.435%
- Docker downloads count: 1.04%
- Maintainers (5)
rubygems.org: ruby-graphviz
Ruby/Graphviz provides an interface to layout and generate images of directed graphs in a variety of formats (PostScript, PNG, etc.) using GraphViz.
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Documentation: http://www.rubydoc.info/gems/ruby-graphviz/
- Licenses: GPL-2.0
- Latest release: 1.2.5 (published almost 6 years ago)
- Last Synced: 2026-03-02T18:32:09.591Z (about 20 hours ago)
- Versions: 43
- Dependent Packages: 166
- Dependent Repositories: 8,095
- Downloads: 65,972,675 Total
- Docker Downloads: 14,466,310
-
Rankings:
- Dependent packages count: 0.21%
- Dependent repos count: 0.361%
- Downloads: 0.442%
- Average: 1.284%
- Docker downloads count: 1.946%
- Stargazers count: 2.324%
- Forks count: 2.42%
- Maintainers (5)
proxy.golang.org: github.com/glejeune/ruby-graphviz
- Homepage:
- Documentation: https://pkg.go.dev/github.com/glejeune/ruby-graphviz#section-documentation
- Licenses: other
- Latest release: v1.2.5 (published almost 6 years ago)
- Last Synced: 2026-02-28T23:00:57.513Z (3 days ago)
- Versions: 16
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 6.999%
- Average: 8.173%
- Dependent repos count: 9.346%
proxy.golang.org: github.com/glejeune/Ruby-graphviz
- Homepage:
- Documentation: https://pkg.go.dev/github.com/glejeune/Ruby-graphviz#section-documentation
- Licenses: other
- Latest release: v1.2.5 (published almost 6 years ago)
- Last Synced: 2026-02-28T23:00:57.327Z (3 days ago)
- Versions: 16
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 6.999%
- Average: 8.173%
- Dependent repos count: 9.346%
proxy.golang.org: github.com/glejeune/Ruby-Graphviz
- Homepage:
- Documentation: https://pkg.go.dev/github.com/glejeune/Ruby-Graphviz#section-documentation
- Licenses: other
- Latest release: v1.2.5 (published almost 6 years ago)
- Last Synced: 2026-02-28T23:00:58.058Z (3 days ago)
- Versions: 16
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 6.999%
- Average: 8.173%
- Dependent repos count: 9.346%
debian-10: ruby-graphviz
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Documentation: https://packages.debian.org/buster/ruby-graphviz
- Licenses:
- Latest release: 1.2.3-1 (published 20 days ago)
- Last Synced: 2026-02-13T04:22:03.724Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.04: ruby-graphviz
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Licenses:
- Latest release: 1.2.5-2ubuntu1 (published 20 days ago)
- Last Synced: 2026-02-11T06:40:29.469Z (20 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-20.04: ruby-graphviz
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Licenses:
- Latest release: 1.2.3-1ubuntu1 (published 18 days ago)
- Last Synced: 2026-02-13T07:14:38.864Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-11: ruby-graphviz
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Documentation: https://packages.debian.org/bullseye/ruby-graphviz
- Licenses:
- Latest release: 1.2.5-2 (published 21 days ago)
- Last Synced: 2026-02-13T08:20:55.986Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.10: ruby-graphviz
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Licenses:
- Latest release: 1.2.5-2ubuntu1 (published 18 days ago)
- Last Synced: 2026-02-13T18:21:29.662Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-22.04: ruby-graphviz
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Licenses:
- Latest release: 1.2.5-2ubuntu1 (published 18 days ago)
- Last Synced: 2026-02-13T13:17:51.951Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-graphviz
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Documentation: https://packages.debian.org/bookworm/ruby-graphviz
- Licenses:
- Latest release: 1.2.5-3 (published 19 days ago)
- Last Synced: 2026-02-12T23:31:21.363Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
debian-13: ruby-graphviz
- Homepage: https://github.com/glejeune/Ruby-Graphviz
- Documentation: https://packages.debian.org/trixie/ruby-graphviz
- Licenses:
- Latest release: 1.2.5-3 (published 19 days ago)
- Last Synced: 2026-02-13T13:16:11.013Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- bundler >= 0 development
- github_changelog_generator >= 0 development
- rake >= 0 development
- rdoc >= 0 development
- test-unit >= 0 development
- yard >= 0 development
- rexml >= 0
Score: 29.048900823083635