1
我已經創建了一個圖表(graph1.xml
),這是我在前面的腳本中保存的。我現在已經加載了這個圖表,並試圖繪製它。當我鍵入python2.7(在Ubuntu)以下:當在圖形工具中繪製圖形時,只出現頂點,沒有邊線
load_graph('graph1.xml')
我收到一條消息說:
<Graph object, directed, with 10194124 vertices and 25920412 edges at 0x7fbb837a2e10>
使圖形對象明確含有大量的頂點和相當數量的邊緣。因此,我繼續執行下面的代碼:
g = load_graph('graph1.xml')
root_vertex = find_vertex(g, g.vp.vprop, '774123')
root_vertex = root_vertex[0]
graph_draw(g, pos=radial_tree_layout(g, root_vertex), output="test-radial1.png")
它返回消息說:不過
<PropertyMap object with key type 'Vertex' and value type 'vector<double>', for Graph 0x7fbb83747410, at 0x7fbb837476d0>
當我打開我所用名稱test-radial1.png
確實出現運行代碼的文件的文件夾,它似乎只顯示一些頂點:
爲什麼會這樣?