2013-03-19 55 views
2

我已經創建了下面的graphviz的圖形交叉的相鄰節點,表示隨循環鏈表:防止Grphviz箭頭邊緣從

igraph foo { 
    rankdir=LR; 
    node [shape=record]; 
    a [label="{ <data> 12 | <ref> }", width=1.2] 
    b [label="{ <data> 99 | <ref> }"]; 
    c [label="{ <data> 37 | <ref> }"]; 
    a:ref:c -> b:data [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false, arrowsize=1.2]; 
    b:ref:c -> c:data [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false]; 
    c:ref:c -> b:data [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false]; 
} 

不幸的是,從c:refb:data雜交節點c箭頭:

enter image description here

我該如何強制邊緣繞過節點而不穿過它們?

回答

3

我無法找到一個簡單的和完全令人滿意的答案,但改變可能指南針點幫幫我。

digraph foo { 
    rankdir=LR; 
    node [shape=record]; 
    a [label="{ <data> 12 | <ref> }", width=1.2] 
    b [label="{ <data> 99 | <ref> }"]; 
    c [label="{ <data> 37 | <ref> }"]; 
    a:ref:c -> b:data [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false, arrowsize=1.2]; 
    b:ref:c -> c:data [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false]; 
    c:ref:s -> b:data:s [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false]; 
} 

changed compass point

+0

不錯的答案!我不斷學習...... – CapelliC 2015-10-02 14:37:09

1

您可以爲您點文件,並打開文件svgms visio例如後運行"dot -Tsvg",做這樣的事情enter image description here

+0

+1謝謝,這是一個有趣的想法,但我正在尋找一個graphviz的解決方案。我不喜歡編譯它後手動編輯每個鏈表的想法。 – 2013-03-26 13:44:51