This page lists some more example scenarios where you can use a flowchart Graphviz diagram.
ExampleScenario | Description | DOT syntax | Output |
---|
Fun with Email | The Email ID is split into a flow chart. |
Code Block |
---|
digraph {
size="5,5"
rankdir=LR;
"testuser" -> "@" -> "appfire" -> "." -> "com" [color=orange]
} |
| |
Sample validation flow | Generates a flowchart for validation flow. |
Code Block |
---|
digraph {
label="How to make sure 'input' is valid"
start[shape="box", style=rounded];
end[shape="box", style=rounded];
if_valid[shape="diamond", style=""];
message[shape="parallelogram", style=""]
input[shape="parallelogram", style=""]
start -> input;
input -> if_valid;
if_valid -> message[label="no"];
if_valid -> end[label="yes"];
message -> input;
} |
| |
Polygonal shapes | Generates polygonal shapes and a directed graph. |
Code Block |
---|
digraph {
a -> b -> c;
b -> d;
a [shape=polygon,sides=5,peripheries=3,color=orange,style=filled];
c [shape=polygon,sides=4,skew=.6,label="4-sided polygon"]
d [shape=invtriangle];
e [shape=polygon,sides=4,distortion=.9];
} |
| Image Modified
|
Directed graph | Generates a directed graph. |
Code Block |
---|
digraph {
a -> b;
a -> c -> d;
c -> e;
} |
| Image Modified
|
Graphviz subgraphs | A graph with sub-graphs. |
Code Block |
---|
digraph {
subgraph cluster_0 {
label="Subgraph A";
a -> b;
b -> c;
c -> d;
}
subgraph cluster_1 {
label="Subgraph B";
a -> f;
f -> c;
}
} |
| Image Added |
Medium graph | A undirected graph for medium-size data sets. |
Code Block |
---|
digraph
{
ratio="compress";
node [style=filled];
start -> main [color="0.002 0.999 0.999"];
start -> on_exit [color="0.649 0.701 0.701"];
main -> sort [color="0.348 0.839 0.839"];
main -> merge [color="0.515 0.762 0.762"];
main -> term [color="0.647 0.702 0.702"];
main -> oldfile [color="0.650 0.700 0.700"];
sort -> msort [color="0.619 0.714 0.714"];
sort -> filbuf [color="0.650 0.700 0.700"];
msort -> qsort [color="0.650 0.700 0.700"];
msort -> insert [color="0.650 0.700 0.700"];
msort -> cmpsave [color="0.650 0.700 0.700"];
merge -> insert [color="0.650 0.700 0.700"];
merge -> rline [color="0.650 0.700 0.700"];
insert -> cmpa [color="0.650 0.700 0.700"];
qsort -> cmpa [color="0.650 0.700 0.700"];
rline -> filbuf [color="0.649 0.700 0.700"];
term -> unlink [color="0.650 0.700 0.700"];
term -> signal [color="0.650 0.700 0.700"];
} |
| Image Added |
Flow diagram | Generates a process flow. |
Code Block |
---|
digraph
{
node[shape=record]
subgraph level0{
enti1 [label="Customer" shape=box];
enti2 [label="Manager" shape=box];
}
subgraph cluster_level1{
label ="Level 1";
proc1 [label="{<f0> 1.0|<f1> One process here\n\n\n}" shape=Mrecord];
proc2 [label="{<f0> 2.0|<f1> Other process here\n\n\n}" shape=Mrecord];
store1 [label="<f0> |<f1> Data store one"];
store2 [label="<f0> |<f1> Data store two"];
{rank=same; store1, store2}
}
enti1 -> proc1
enti2 -> proc2
store1 -> proc1
store2 -> proc2
proc1 -> store2
store2 -> proc1
} |
| Image Added |
Machine graph | A directed machine graph. |
Code Block |
---|
digraph {
rankdir=LR;
size="8,5"
node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
node [shape = circle];
LR_0 -> LR_2 [ label = "SS(B)" ];
LR_0 -> LR_1 [ label = "SS(S)" ];
LR_1 -> LR_3 [ label = "S($end)" ];
LR_2 -> LR_6 [ label = "SS(b)" ];
LR_2 -> LR_5 [ label = "SS(a)" ];
LR_2 -> LR_4 [ label = "S(A)" ];
LR_5 -> LR_7 [ label = "S(b)" ];
LR_5 -> LR_5 [ label = "S(a)" ];
LR_6 -> LR_6 [ label = "S(b)" ];
LR_6 -> LR_5 [ label = "S(a)" ];
LR_7 -> LR_8 [ label = "S(b)" ];
LR_7 -> LR_5 [ label = "S(a)" ];
LR_8 -> LR_6 [ label = "S(b)" ];
LR_8 -> LR_5 [ label = "S(a)" ];
} |
| Image Added |