This site has been archived and will no longer be updated.
You can find my new profile at neilpahl.com. My new blog is at 808.ninja.
Fri, 16 Dec 2011:
I'm a visual thinker, and I feel that i best describe my ideas through hand drawn images. So, for making diagrams and flowcharts, it looks like Graphviz is going to be my choice. I'm choosing it mainly because I can use it tomake diagrams in the command line.
Thinking back to when I was in school, I remember spending so much time drawing up a flowchart using the (abominous) flowchart drawing tools provided in MS Word. It took forever.
But now, Graphviz uses very simple text to generate the diagram. This will be faster to draw and even faster to edit in the future. For example, something as simpdle as
digraph G { a -> b; a -> c; b -> d; b -> e; c -> f; c -> g; c -> h; g -> i; g -> j; }
will generate all the neccesary arrows. But don't be fooled, there are a lot more capabilities.
The documentation of Graphviz is quite technical, and not that easy for the newcomer to decypher. But, I'm sure i'll get the hang of it as I start using it more.
I think there user base would expand if they included a "getting started" section on their homepage. I tried installing the .deb file on my ubuntu machine, but their were some unmet dependancies (+1 for apt package manager). luckily, it was a breeze installing the core tools using the ubuntu gui package manager.
I will be following the command line instructions to use graphviz via the command line.
Sun, 26 Feb 2012:
I installed graphviz in the command line on ubuntu with
sudo apt-get install graphviz
On mac, I used macports via the command
sudo port install graphviz
Next, I created a dot file with a text editor. Something simple like:
digraph G { one -> two; one -> three; one -> four; four -> five -> six; five -> one; six -> two; }
then, save it as dotFile.dot
Next, in the command line, you can use that dot file to generate the graph. The format is as follows:
dot -Txxx dotFile.dot -o graphName.xxx
so for png, I use:
dot -Tpng dotFile.dot -o graphname.png
see the man page with
man dot
and you will see instructions for the command line usage for:
dot - filter for drawing directed graphs
neato - filter for drawing undirected graphs
twopi - filter for radial layouts of graphs
circo - filter for circular layout of graphs
fdp - filter for drawing undirected graphs
sfdp - filter for drawing large undirected graphs
I used dot above, but if you try generating the graph with neato, twopi, circo, fdp, or sfdp you get differently structured graphs. So, testing it out, I got the following:
dot -Tpng dotFile.dot -o dotGraph.png
neato -Tpng dotFile.dot -o neatoGraph.png
twopi -Tpng dotFile.dot -o twopiGraph.png
circo -Tpng dotFile.dot -o circoGraph.png
fdp -Tpng dotFile.dot -o fdpGraph.png
sfdp -Tpng dotFile.dot -o sfdpGraph.png
They all use the same .dot file, but I have yet to determine the fundamental defferences between each. I'm sure that each method has its advantages and drawbacks... things usually work that way. Perhaps as I learn about more about writing .dot files It will become more clear.
Next, I need to learn how to add some more style to my graphs, I'll look to the pdf guide found at http://www.graphviz.org/pdf/dotguide.pdf
or, in case they moved it, I uploaded a copy you can download here
I think I will print out some of the appendices for quick reference on styles I can use while creating graphs.