GraphViz Examples by Natalie

GraphViz is a nice, extensible tool to draw graphs, trees, diagrams, among others. It's scripted using a simple language called DOT, which reads a lot like text in plain English.

I've published a handful of examples, and an unfinished guide here on this website. You may also find the official user documentation useful.

A taste of DOT (refresh for another!)

 0digraph cgol {
 1»   node [
 2»   »   fontname = "Lato, sans-serif";
 3»   »   width = 0; height = 0;
 4»   »   shape = box;
 5»   »   color = "#cccccc";
 6»   ];
 7»   edge [
 8»   »   fontname = "Lato, sans-serif";
 9»   »   arrowhead = normal;
10»   »   arrowsize = 0.5;
11»   ];
12»   
13»   "start" [shape = "oval"]
14»   
15»   "am i alive?",
16»   "are there fewer than 2 live cells around me?",
17»   "are there more than 3 live cells around me?",
18»   "are there 3 live cells around me?" [
19»   »   shape = "diamond";
20»   »   height = 1.2;
21»   ]
22»   
23»   "are there fewer than 2 live cells around me?" [
24»   »   label = "are there fewer than\n2 live cells around me?"
25»   ]
26»   "are there more than 3 live cells around me?" [
27»   »   label = "are there more than\n3 live cells around me?"
28»   ]
29»   "are there 3 live cells around me?" [
30»   »   label = "are there 3 live\n cells around me?"
31»   ]
32»   "become dead *" [label = "become dead"]
33»   
34»   "start" -> "for each cell" -> "for each cell" -> "am i alive?";
35»   "am i alive?" ->
36»   »   "are there fewer than 2 live cells around me?" [label = "yes"];
37»   "are there fewer than 2 live cells around me?" ->
38»   »   "become dead *" [label = "yes"];
39»   "are there fewer than 2 live cells around me?" ->
40»   »   "are there more than 3 live cells around me?" [label = "no"];
41»   "are there more than 3 live cells around me?" ->
42»   »   "become dead" [label = "yes"];
43»   "am i alive?" ->
44»   »   "are there 3 live cells around me?" [label = "no"];
45»   "are there 3 live cells around me?" ->
46»   »   "become live" [label = "yes"];
47}