I generate a code for graphviz. This network plan always contains 2 arrows for there and back directions. Unfortunately, 2 separate arrows are displayed in the example - but I don’t want that…
but with „splines=false“, I can prevent the double arrows. how do I make sure the arrows don’t cross the nodes?
Your source file seems perfectly “legal”. Unfortunately, you seem to be encountering bug(s) or odd “works as designed” results (more later)
I can find no combination of layout engines and attributes that will produce the graph you want, without eliminating (duplicated) edges and adding the attribute dir=both
here is a gvpr program that identifies duplicated edges (with head & tail reversed), deletes one, and adds dir=both to the “survivor”. gvpr is documented here: https://www.graphviz.org/pdf/gvpr.1.pdf
/**********************************************************************
assumes 2 edges with tail & head "swapped"
- changes "dir" of 1st to "both"
- deletes the 2nd
**********************************************************************/
BEG_G{
int edgeExists[], deleteIt[];
obj_t Obj;
string tmpS, headP, tailP;
}
E{
if (hasAttr($, "tailport") && $.tailport!="")
tailP=$.tailport;
else
tailP="";
if (hasAttr($, "headport") && $.headport!="")
headP=$.headport;
else
headP="";
tmpS=$.head.name + "_" + headP + "-" + $.tail.name + "_" + tailP;
if (edgeExists[tmpS]==1)
deleteIt[$]=1;
else
$.dir="both";
tmpS=$.tail.name + "_" + tailP + "-" + $.head.name + "_" + headP;
edgeExists[tmpS]=1;
}
END_G{
for (deleteIt[Obj])
delete($G, Obj);
}
The documentation for concentrate is somewhat ambiguous, but it is minimally annoying that it produces different results depending on the layout engine, the value for the splines attribute, and the nature of the individual edges. I will create an Issue describing the problem. (I think it is a set of bugs).
It appears that your network is not particularly hierarchical. Below are results of using other layout engines. For this subset, I like circo best, but neato might be best for your complete graph.
Hello,
I tried circo, neato, fdp with about 200 network elements and, due to the horizontal arrangement of the ports, decided that it is best represented with dot. Now I have converted all bidirectional connections to unidirectional and let them be drawn. Unfortunately, the result was moderately unsatisfactory. The reason for this is the limited compact representation with LR orientation. The automatic arrangement works well only with bidirectional connections. Unfortunately, I have the original problem with the double arrows here.
Converting individual duplicated connections to unidirectional does not help either, because during compilation, they are either automatically redrawn, or the direction a->b and b->a must be correctly specified. With the large number and frequent updates of the connection data, this is not practical, unfortunately…
Unfortunately, I cannot share the source file due to client confidentiality, as it requires time to convert headers and content. In principle, this is just an extension of the first post. Approximately 95% of the connections are bidirectional, 5% unidirectional…