'Graphviz: edges between cells in the same html table are too long

I want to draw edges between cells in the same table node in graphviz, but the edges are way too long, which may overlap other nodes. How to make these edges shorter?

Here is an example.

digraph graphviz {
    graph [rankdir = "LR"];
    node [shape = "plaintext"];
    
    "A" [label=<
        <TABLE>
        <TR><TD PORT="a">cell a</TD></TR>
        <TR><TD PORT="b">cell b</TD></TR>
        <TR><TD PORT="c">cell c</TD></TR>
        </TABLE>
    >];
    
    "B" [label=<
        <TABLE>
        <TR><TD PORT="a">cell a</TD></TR>
        <TR><TD PORT="b">cell b</TD></TR>
        </TABLE>
    >];
    
    "A":"c" -> "A":"a";
    "A":"c" -> "A":"b";
    
    "B":"a" -> "A":"a";
}

I found a similar issue Loopy edge too long, but there is no answer.



Solution 1:[1]

This seems to produce smaller edges (less loopy):
dot -Tdot myfile.gv |neato -n -Tpng >$myfile.png
It uses dot to position the nodes and neato to position the edges. See: https://graphviz.org/faq/#FaqDotWithNodeCoords and https://graphviz.org/docs/outputs/canon/
Before:
enter image description here
After:
enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sroush