Graphs (last update: 2012-10-07, created: 2012-10-07) back to the list ↑
Some more stuff I tend to forget.

DOT file format - good reference - example gallery

Renderers: dot / graphviz

Installing and using graphviz on Ubuntu:

sudo apt-get install graphviz
dot -Tpng > name.png

Simple example graph

Sample code:

digraph nodes {
  ratio = "auto";
  layout = "dot";
  /*ranksep=3.0; nodesep=2.0;*/
  node [fontsize=12, height=0.6, width=0.6, fixedsize=false];
  node [shape=ellipse, style=filled];
  edge [style=solid];

  node [fillcolor="#0000ff", fontcolor="white", penwidth=2];

  a [label="I am the A"];
  b [label="Hi from B"];
  c [label="Diamond C"];
  d [label="D d d..."];

  a -> b;
  b -> d;
  edge [style=dashed];   c -> b;


【 design & art by Xa / Gynvael Coldwind 】 【 logo font (birdman regular) by utopiafonts / Dale Harris 】