Examples 1

 

These examples demonstrate the possibilities of 'dot' and S-Dot. Below each graph the S-Dot source code is listed. Click on the element and attribute names to get a documentation.

Sponsored links:

 

The following examples are taken from the GraphViz web site (http://www.graphviz.org/Gallery.php).

Example 1/3:
Source code:
'
(graph ()
 
(cluster ((id "0") (style "filled") (color "#CCCCCC") (label "process #1"))
 
(node ((id "a0") (style "filled") (color "#FFFFFF")))
(node ((id "a1") (style "filled") (color "#FFFFFF")))
(node ((id "a2") (style "filled") (color "#FFFFFF")))
(node ((id "a3") (style "filled") (color "#FFFFFF")))
(edge ((from "a0") (to "a1")))
(edge ((from "a1") (to "a2")))
(edge ((from "a2") (to "a3")))
(edge ((from "a3") (to "a0"))))
(cluster ((id "1") (color "#3030CC") (label "process #2"))
 
(node ((id "b0") (style "filled")))
(node ((id "b1") (style "filled")))
(node ((id "b2") (style "filled")))
(node ((id "b3") (style "filled")))
(edge ((from "b0") (to "b1")))
(edge ((from "b1") (to "b2")))
(edge ((from "b2") (to "b3")))
(edge ((from "b3") (to "b0"))))
(node ((id "start") (shape "Mdiamond")))
(node ((id "end") (shape "Msquare")))
(edge ((from "start") (to "a0")))
(edge ((from "start") (to "b0")))
(edge ((from "a1") (to "b3")))
(edge ((from "b2") (to "a3")))
(edge ((from "a3") (to "end")))
(edge ((from "b3") (to "end"))))
Example 2/3:
Source code:
'
(graph ()
 
(node ((id "label") (label "Machine: a") (shape "plaintext") (fontname "Helvetica")))
(node ((id "0") (style "filled") (color "#CCCCCC") (shape "circle") (fontname "Helvetica")))
(node ((id "1") (shape "circle") (fontname "Helvetica")))
(node ((id "2") (shape "doublecircle") (fontname "Helvetica")))
(edge ((from "0") (to "2") (label "a") (fontname "Helvetica")))
(edge ((from "0") (to "1") (label "other") (fontname "Helvetica")))
(edge ((from "1") (to "2") (label "a") (fontname "Helvetica")))
(edge ((from "1") (to "1") (label "other") (fontname "Helvetica")))
(edge ((from "2") (to "2") (label "a") (fontname "Helvetica")))
(edge ((from "2") (to "1") (label "other") (fontname "Helvetica"))))
Example 3/3:
Source code:
'
(graph ()
 
(record ()
 
(node ((id "10") (label "left")))
(node ((id "11") (label "middle")))
(node ((id "12") (label "right"))))
(record ()
 
(node ((id "20") (label "one")))
(node ((id "21") (label "two"))))
(record ()
 
(node ((id "30") (label "hello\nworld")))
(record ()
 
(node ((id "311") (label "b")))
(record ()
 
(node ((id "3120") (label "c")))
(node ((id "3121") (label "d")))
(node ((id "3122") (label "e"))))
(node ((id "313") (label "f"))))
(node ((id "32") (label "g")))
(node ((id "33") (label "h"))))
(edge ((from "11") (to "20")))
(edge ((from "12") (to "3121"))))
Sponsored links

 Copyright 2006-2010 by Martin Loetzsch (http://martin-loetzsch.de), all rights reserved. See the S-Dot licence for details.