cluster directed self transition

Hello, is it possible to produce a self transition of a cluster (subgraph)?

Example:

digraph G { compound = true; subgraph cluster0 {

a->b; a->{c};

b->d; c->d;

}

subgraph cluster1 {

e->g; e->f; } b->f [lhead=cluster1];

d->e;

c->g [ltail=cluster0,lhead=cluster1];

c->e [ltail=cluster0];

d->h;

// self transition of cluster0???

a->a [ltail=cluster0, lhead=cluster0];

}

Unfortunately, the last transition (a->a ...) produces a directed transition from node a to node a instead of clipping both arrow ends to the bounding area of the cluster.

Is there a solution for this kind of problem?

Greetings,

Markus

cluster directed self

There is no good way to do this now. The problem is that compound edges are really a hack, clipping real edges to cluster boundaries. In particular, if you have a loop, it may well be drawn entirely within the enclosing cluster, so clipping would erase the edge altother. There are some tricks that can be used to approximate what you want. For example, replacing a->a with
 
x [style=invis]
a->x[dir=none ltail=cluster0 headclip=false];
x->b[lhead=cluster0 tailclip=false];
 
where x is outside cluster0.

Recent comments