Graphviz Example: subgraphs

digraph MultiLayerArchitecture {
subgraph cluster_0 {
label = "Presentation Layer";
node [style=filled, color=lightblue];
A [label="Web Browser"];
B [label="Mobile App"];
}

subgraph cluster_1 {
label = "Application Layer";
node [style=filled, color=lightgreen];
C [label="Web Server"];
D [label="Application Server"];
}

subgraph cluster_2 {
label = "Data Layer";
node [style=filled, color=lightyellow];
E [label="Database"];
F [label="File Storage"];
}

A -> C;
B -> C;
C -> D;
D -> E;
D -> F;
}

MultiLayerArchitecture cluster_0 Presentation Layer cluster_1 Application Layer cluster_2 Data Layer A Web Browser C Web Server A->C B Mobile App B->C D Application Server C->D E Database D->E F File Storage D->F