With the following dot code
digraph DG {
G -> V;
G -> E;
G -> P;
G -> C;
}
I generate the following graph
How could I move the node G in the centre? That is I wish to get something like this:
p.s. My experiments with setting the rank of the edge didn't work out.
For the general case, the easiest thing to do is to use twopi or neato instead of dot as your layout engine.
Twopi:
Neato:
If you're truly confined to dot, this will give you close to what you want, though you'll have to customize each graph.
digraph g
{
P -> G [dir=back];
subgraph clusterGVE {
{rank=same V; G; E;}
G -> V [constraint=false];
G -> E;
color=invis;
};
G -> C;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With