How to prevent edge labels from messing up the layout in graphviz? -


I have a simple vertical graph that looks nice and symmetric without any label using the following code:

  Diagram test_alignment {{rank = same; A - & gt; B;} A -> C; B - & gt; C; C -> D; D -> E D -> F; {Rank same =; E - & gt; F;}}   

I want to label the edge between A and B along the edge between E and F, for each Use the same string label. I'm expecting the same output, except that the A-> B and E-> The F edges are divided by the same label.

Unfortunately, as soon as I add a label to one of these edges, the normal layout appears on the slightest side (the result is the same if I add a label on the E-> F edge):

  diagram test_alignment {{rank = same; A - & gt; B [label = "label"];} A -> C; B - & gt; C; C -> D; D -> E D -> F; {Rank same =; E - & gt; F;}}   

I am very new to grapeways and, following the many questions on stack overflow, I experiment with different combinations of ranks and constraints Trying to use I'm using the cluster to try to see if it holds the top and bottom part properly aligned, and to use a mix of dot, CCPP, GVPak and Neto Tried similar results Is produced.

It always boils down to the fact of adding a label to the edges of the nodes of one rank, how these nodes have been deployed in a manner that I have not yet been understood.

Am I missing something trivial, or am I trying something, should not I change the dot instead of talking to it?

I am using Dot - Graphview Version 2.36.0 (20140111.2315) and the linked images are created only with dot (although I had achieved similar results:

  dot test_alignment.dot -Tpng -O   

Thanks a lot!

If necessary, you can try to use the attribute with forcelabels .

... for edges, label Will be placed near the center of the edge. Use Ebl to avoid time sometimes a problem to distract the layout it could be useful in dot. ..

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -