Subgraph must starts with cluster.
digraph G { subgraph cluster_0 { label = "process #1"; style=filled; color=lightgrey; node [style=filled,color=white]; a0 -> a1; } subgraph cluster_1 { label = "process #2"; color=blue node [style=filled]; b0 -> b1 } // Link start node to the subgraphs start [shape=Mdiamond]; start->a0; start->b0; }
digraph G { // Recursively encapsulate the real subgraph with an invisible subgraph to create space. // Red color so that you can see. subgraph cluster_AddSpaceA1{ color=red; subgraph cluster_AddSpaceA2{ color=red; subgraph cluster_A { label = "process #1"; style=filled; color=lightgrey; node [style=filled,color=white]; a0 -> a1; } } } // Since I set the color to transparent, you will not see the *AddSpaceB* subgraphs. subgraph cluster_AddSpaceB1{ color=transparent; subgraph cluster_AddSpaceB2{ color=transparent; subgraph cluster_B { label = "process #2"; color=blue node [style=filled]; b0 -> b1 } } } // Link start node to the subgraphs start [shape=Mdiamond]; start->a0; start->b0; }