Graphviz and Diagrams

I’ve not had much use for diagramming tools. While they might be helpful for showing how servers and network nodes relate or flow, I’ve always sort of avoided it because I figured I didn’t need it.

Not that I do now, either, but I read an interesting thread on /r/Linux about using tools other than Microsoft’s Visio program. The response that struck me as the most interesting is about using Graphviz with the dot diagramming language. Mostly because it allows you to eschew the often confusing GUI for diagrams and work straight with the logical flow.

Also in the post was a link to a (very) simple tutorial on the way the dot language works. For making diagrams, I couldn’t really think of any way to define objects and their relationships in a more simple language.

In the tutorial, here’s a sort of “hello world” diagram:

digraph {
    Hello -> World
}

Simple? Right. Here’s how it looks when it’s compiled (PNG for those of you unfortunate enough to not have a browser with SVG support):

Hello World Diagram

Easy!

Naturally you may want to have more complicated graphs, and you may need to venture into the dreaded Visio land due to organizational requirements, it’s nice to see something like this exists. Especially with the dot2tex program, which allows you to build diagrams that you can import into your LaTeX documents!