我得通過graphviz的工具製造(現在,我使用sfdp
)無向圖:graphviz的重疊=鄰:橫向佈局
digraph structs {
node [shape=Mrecord, URL="index_new.php?object=\N&overlap=false"];
overlap = orthoxy;
bgcolor=transparent;
splines=true;
rankdir=TB;
node [fontname="Arial", fontsize=30, style=filled, fillcolor=chartreuse1, image="../common/img/monitor.png"]struct_swbposad91 [label = "sw-bposad9-1\n192.168.17.141\nC2960 "];
node [fontname="Arial", fontsize=30, style=filled, fillcolor=chartreuse1, image="../common/img/monitor.png"]struct_swmedikov5fan [label = "sw-medikov5-fan\n192.168.34.134\n "];
node [fontname="Arial", fontsize=30, style=filled, fillcolor=chartreuse1, image="../common/img/monitor.png"]struct_swlevash131 [label = "sw-levash13-1\n192.168.16.165\nC2960 "];
node [fontname="Arial", fontsize=30, style=filled, fillcolor=deepskyblue]struct_swpolevsabirov45a [label = "sw-polevsabirov45a\n192.168.18.182\nS2300 "];
...lots of lines goes here...
struct_swkazan71:f450212->struct_swbmorsk181:f450213 [weight=1.2, dir=both, color=black, penwidth=5, arrowhead="empty", arrowtail="odot"];
struct_swmikh171:f450222->struct_swbotk151:f450223 [weight=1.2, dir=both, color=black, penwidth=1, arrowhead="empty", arrowtail="odot"];
...lots of lines goes here...
這裏是全碼:http://pastebin.com/P3MKTCm2(這是真的大了,不好意思)
和輸出是這樣的一種:(份)
問題:我需要我的曲線圖,以代替horizontaly成長的垂直年。有沒有什麼辦法讓圖像上的佈局像「旋轉」90度一樣?
這種看起來像有向圖,而你的短樣本表示有向圖(使用'digraph')。如果您使用具有有向邊(' - >')的'digraph'或帶有無向邊的'graph'('--'),'sfdp'只會生成輸出。總之,如果你發佈了一個完整的圖表來處理,那將會更容易。順便說一句,在定義節點的url時,我必須在雙引號前刪除反斜槓。 – marapet 2012-02-04 13:58:58
@marapet我編輯了我的問題,並將所有點代碼放入pastebin – k102 2012-02-07 08:03:13