Reputation: 6915
I have a dense dot graph with many edges and a node that has connections to nearly any other node.
For example:
digraph TEST
{
rankdir=LR;
node [shape=plaintext];
graph [compound=true];
A[label=<<table border="0" cellspacing="0" cellborder="1" >
<tr><td >A</td></tr>
<tr><td port='a1'>a1</td></tr>
<tr><td port='a2'>a2</td></tr>
</table>>];
B;
C;
D;
E;
F;
G;
H;
I;
A:a1:e->B:w;
A:a1:e->C:w;
A:a1:e->D:w;
A:a1:e->E:w;
A:a1:e->F:w;
A:a1:e->G:w;
A:a1:e->H:w;
A:a1:e->I:w;
A:a2:e->B:w;
B:e->C:w;
C:e->D:w;
D:e->E:w;
E:e->F:w;
E:e->G:w;
E:e->H:w;
F:e->I:w
G:e->I:w
H:e->I:w
}
I would like to hide the a1
connections and add some kind of jump labels to keep the information available for the reader.
E.g.:
A:a1:e->{a1_out[label="a1"]};
{a1_Bin[label="a1"]}->B:w;
{a1_Cin[label="a1"]}->C:w;
{a1_Din[label="a1"]}->D:w;
{a1_Ein[label="a1"]}->E:w;
{a1_Fin[label="a1"]}->F:w;
{a1_Gin[label="a1"]}->G:w;
{a1_Hin[label="a1"]}->H:w;
{a1_Iin[label="a1"]}->I:w;
Adding the attribute [style=invis]
to the a1
-connections just does not render them, but keeps the layout as it would be with them. with the result that the placement of the nodes and labels looks strange because of empty spaces and dense connections in other places.
Removing the connections completely does change the semantics of the graph and the ranks of the graph nodes (not in this example but it will in other ones).
So I am looking for a way to provide dot
the information to correctly calculating all the dependencies between the nodes on the one side and to advise it, not to draw render and draw these connections on the other side.
Upvotes: 0
Views: 810
Reputation: 56566
An approach to clean up the edges in such a graph could be to use
concentrate=true
According to the documentation, this will
... merge multiedges into a single edge and cause partially parallel edges to share part of their paths
Upvotes: 1