Is there a way to make a node come somewhere after another node, but without using the rank=same method? Same constrains the graph quite significantly, but after gives it a bit more freedom.
digraph G {
rankdir=LR
a->b->c->d
a->x->y
{rank = same; d; x;}
}
In this example I don't care that x is the same rank as d, just that it's after c.
A similar question has been asked before, but not answered: Python - Graphviz force rank to be at least the same
Subgraphs could be used as a grouping strategy, but I'm already using subgraphs. I don't think that a node can be in two simultaniously.
digraph G {
rankdir=LR
a->b->c->d
a->x->y
subgraph cluster_after{
x; d; y;
}
}
Both of these methods need a bit of user awareness, but what I'd realy like is to be able to say that "lighting comes after electricity" but without having to know how far after, how many nodes are in between, or how they're connected. Is this possible?