Digraph between clusters/subgraphs

Hello there,

I am trying to construct a graph among the subgraphs (basically I need cycles among the subgraphs) but I could not come up with a correct ordering of the subgraphs to make that happen. The problem is that when I try to add an edge from node a, in subgraph A, to a node b, in subgraph B, dot plots the node b inside the subgraph A not in B.

It seems that the whole problem is that a target node should be already in the output when I add an edge for it. But how can I make that happen when I have a cycle?


Please provide a small

Please provide a small example.

Please see the code below.

Please see the code below. What I would like to do was to have each edge leaving from a node to its "successor" cluster, like the figure in the link: 


digraph {

    subgraph cluster_a {
        label="Cluter A";
        nodea [label="A"];

        nodea -> nodeb [lhead=cluster_b];

    subgraph cluster_b {
        label="Cluter B";
        nodeb [label="B"];

        nodeb -> nodec [lhead=cluster_c];

    subgraph cluster_c {
        label="Cluter C";
        nodec [label="c"];

        nodec -> nodea [lhead=cluster_a];



You did notice the warning

You did notice the warning messages? In Graphviz, if an edge belongs to a cluster, so do its nodes. Second, a node can belong to at most one cluster (unless one cluster contains the other). These two rules mean you have a poorly formed graph. The simplest solution is to pull all of the edges out of the clusters.

Recent comments