Search notes:

compound

compound is a boolean that controls if clusters can be connected with lhead and ltail.
The following example is preprocessed, once by defining the macro COMPOUND to false and once to true. With Microsoft's compiler cl, this is achieved like so:
P:\ath\to\xyz> cl -E -DCOMPOUND=true  connect-clusters.dot_ | dot -Tpng -o img\connect-clusters-true.png
P:\ath\to\xyz> cl -E -DCOMPOUND=false connect-clusters.dot_ | dot -Tpng -o img\connect-clusters-false.png

connect-clusters.dot_

connect-clusters.dot_ is the file that needs to be preprocessed:
digraph {

   compound=COMPOUND

   subgraph cluster_A {
      a1 -> a2
      a1 -> a3
      a2 -> a4
      a3 -> a5
   }

   subgraph cluster_B {
      b1 -> b3
      b2 -> b4
      b3 -> b5
      b4 -> b5
   }

   subgraph cluster_C {
      c1 -> c2
      c1 -> c3
      c3 -> c4
      c3 -> c5
   }

   subgraph cluster_D {
      d1 -> d2
      d1 -> d3
      d2 -> d4
      d2 -> d5
   }


   a5 -> c1 [ltail=cluster_A lhead=cluster_C]
   b5 -> d1 [ltail=cluster_B lhead=cluster_D]

}
Github repository about-Graphviz, path: /attributes/compound/connect-clusters.dot_

Created images

The following image is created with compound=true. The edges (arrows) between the clusters are only drawn outside of the clusters:
This image is created with compound=false. The edges are drawn for their entire length:

See also

Graphviz attributes

Index