Debian Codegraph @

examples/subgraphs.dot

raw
1 /*
2 :Title: Styled subgraphs
3 :Tags: PGF, Preproc
4
5 This example shows how subgraphs can be styled using PGF/TikZ styles.
6 Note that version 1.09 or higher of PGF/TikZ is required.
7
8 Generated with::
9
10 $ dot2tex -tmath --autosize --crop subgraphs.dot > subgraphs.tex
11
12 */
13 digraph G {
14 d2tdocpreamble="\usetikzlibrary{patterns}";
15 size="6,6";
16 node [style="fill=blue!40"];
17 node [shape=circle, width=0.4];
18 a -> b -> c;
19 graph [style="rounded corners, shade"];
20
21 subgraph cluster0 {
22 graph [style="pattern color=red, pattern=bricks, rounded corners"];
23 node [style = "fill=blue, semitransparent"];
24 x_0 -> y_0;
25 x_0 -> z_0;
26 }
27
28 subgraph cluster1 {
29 graph [style="snake=snake, fill=green!20"];
30 node [style = "fill=red!20"];
31 edge [style="->>"];
32 x_1 -> y_1;
33 x_1 -> z_1;
34 }
35
36 subgraph cluster2 {
37 node [style=" "];
38 x_2 -> y_2;
39 x_2 -> z_2;
40 }
41
42 a -> x_0;
43 b -> x_1;
44 b -> x_2;
45 a -> z_2;
46 c -> z_1;
47 }