Graph Visualization Software (Graphviz)


For a long time already I have wanted to post about this cool tool. If you haven't hear of it yet, you maybe should. Graph Visualization Software (short graphviz) is an open-source software package that visualizes graphs, structures, networks, and dependency diagrams.

In order to show how neat, simple, and useful it is, two examples:

An Undirected Graph
Write a text file "graph.dot". We'll define two nodes in our graph: n1 and n2. They are connected.
graph G {
n1 -- n2 ;
}


We compile the file:
neato -Tpdf graph.dot -o undirgraph.pdf



A Directed Graph
Now, we try a directed graph. N1 connects to n2. N2 doesn't connect back to n1.
digraph G {
n1 -> n2 ;
}



Again: compiling:
neato -Tpdf graph.dot -o dirgraph.pdf




You might want to try out the different rendering algorithms provided with dot, neato, twopi, circo, and fdp.

BTW, you might want to try inkscape to edit the pdf. You can move network nodes around, changes fonts, etc. See my other blog post about how to produce high quality figures in linux for latex using scalable vector graphics.

Enjoy. Please leave a comment for questions or suggestions.

No Response to "Graph Visualization Software (Graphviz)"

  Subscribe to replies to this post

 
This conversation is missing your voice. Your feedback is appreciated.
Post a Comment


You can use some HTML tags, such as <b>, <i>, <a>

If you see a message that says "your request could not be processed" press preview first and then post.
 
You can follow the discussion of this post by subscribing.


 
You are free to include information from this article on your own site if you provide a backlink. You can use the following markup:
<a href="http://www.myoutsourcedbrain.com/2009/04/graphviz.html">Graph Visualization Software (Graphviz)</a>