11.08.07
Fun with GraphViz and Dot
While writing a new section of the Cadena Manual I decided to try out a new tool, GraphViz. It is a very simple tool that can create some pretty amazing images of graphs. You simply create a text-based “dot” file with the description of the graph and it creates an image for you.
Here is one of the dot files that I created:digraph interface_kinds {
node [style = filled];
node [color = gainsboro]; mInterface;
node [color = lightslateblue]; mMyEventInterface mMyCommandInterface mMyBundleInterface;
node [color = darkorange]; MyBundleInterface MyEventInterface MyCommandInterface; mInterface->mMyEventInterface;
mInterface->mMyCommandInterface;
mInterface->mMyBundleInterface;
mMyEventInterface->MyEventInterface;
mMyCommandInterface->MyCommandInterface;
mMyBundleInterface->MyBundleInterface;
}
It describes the kinds that will be created in a new Cadena style. When run through dot (dot -Tpng interface_kinds.dot > interface_kinds.png) it produces the following image:

This is a pretty cool utility with a lot of potential uses. I am sure I only scratched the surface of what can be done. But I was pleased with what I was able to create in less than an hour of reading and experimentation.