1
我試圖將使用python graph_tool庫創建的圖形輸出到PNG文件。最終的結果是繪製的圖頂點重疊。我意識到問題是當我把文本放在頂點或邊上時,就像文本框的邊距太大。graph_tool graph_draw頂點文本框邊距頂點重疊
size = 4000
v_size = size/my_graph
e_pwidth = v_size/10
graph_draw(my_graph, vertex_shape='square', vertex_text=my_graph.vp.inst_str, vertex_size=v_size, output_size=(size, int(size*1.5), vertex_font_size=e_pwidth, vertex_aspect=1.5, edge_pen_width=e_pwidth, edge_text=my_graph.ep.edgelabel, output="f.png")
它將輸出類似:
看文字和頂點的邊界之間的距離,我不能去減少距離。