Search code examples
graphviz

Sepetate 2 glutinous arrow header in graphviz


Hi my arrow like following:

https://i.sstatic.net/sSdQn.png

Arrow on the red marked is glutinous.

How do I divide it?


add code

https://www.codepile.net/pile/XKvOwL3A


Solution

  • In your situation fastest fix would be to add nodesep = 0.15 graph attribute (right after digraph { statement). This attribute adjusts the minimal distance between the nodes in one rank. This results in:

    enter image description here

    Also you may play with headport and tailport attributes, as I suggested in the comment. Shortcut for them is to add a colon after node when you are defining edge.

    If you replace TR_Client_Data -> idle with TR_Client_Data -> idle:e you will get this result:

    enter image description here

    Edges are crossed, but they are apart.


    Also I've noticed that you define node attributes in a wrong way: keyword node defines global attributes for all nodes in the graph (or subgraph). If you want to specify attributes for a single node, place them after node definition.

    e.g.

    WRONG:

    node [
        shape = point, 
        fontsize = 12
      ] start_point;
    

    CORRECT:

    start_point [
        shape = point, 
        fontsize = 12
      ];