Per Erik Strandberg /cv /kurser /blog

A simple graph with a few special nodes and edges:
http://www.pererikstrandberg.se/blog/templates/dot-sample.png

The source code (also at [1]) is

digraph "My_Dot_Sample"
{
  1 [label="Init", shape=box];
  2 [label="Heat", shape=triangle];
  3 [label="Run"];
  1 -> 2 [label="Do Warmup"];
  2 -> 3 [label="Warmup OK"];
  2 -> 1 [label="Sleep", color=gray];
  1 -> 3 [label="Force Start", style=dotted, color=red];
  3 -> 1 [label="Sleep", color=gray];
}

I compiled using dot sample.dot -T png -o dot-sample.png

Read more about the dot language:


Tillhör Kategori Mallar