Home > Archives > 2008-05

2008-05

Rubigraph

Summary

I wrote a Rubigraph, a Ruby wrapper for Ubigraph .

What is Ubigraph

I recently found Ubigraph, a nice visualization tool. Though I’m also big fan of Graphviz, which generates static graph visualization, I got falling in love with Ubigraph because it’s so dynamic. Ubigraph can add, remove and change nodes, edges, and their attributes. It’s amazing! See demonstration movie.

It is based on client/server architecture. Though the server source code is closed, its XML-RPC API is open, and we can write our client application easily. It has Mac OS X and Linux binaries.

What is Rubigraph

But, I cannot put up with writing XML-RPC by referencing API manual every time ! So I made a small Ruby wrap for it, and released it as Rubigraph.

Install

Type gem install rubygraph. Its place in Rubyforge is here.

Source code

How do I write a graph

require 'rubigraph'
 
Rubigraph.init        # initialize XML-RPC client.
 
v1  = Vertex.new
v2  = Vertex.new
e12 = Edge.new(v1, v2)
 
v1.color  = '#003366'
v2.shape  = 'sphere'
e12.label = 'edge between 1 and 2'

It seems easy, isn’t it?

Conclusion

It’s a fun to visualize some data dynamically. I’m using it for tracing function calls, feeling so convinient. Ubigraph++.

Home > Archives > 2008-05

Feeds

Return to page top