0

Here is basic script I use for drawing:

from graph_tool.all import *
g = load_graph("data.graphml")
g.set_directed(False)
pos = sfdp_layout(g)
graph_draw(g, pos=pos, output_size=(5000, 5000), vertex_text=g.vertex_index, vertex_fill_color=g.vertex_properties["color"], edge_text=g.edge_properties["name"], output="result.png")

Main problems here are ugly edge text and vertexes that are too close to parent. As I understand this happens because by default fit_view=True and result image scaled to fit size. When I set fit_view=False result image doesn't have graph (I see only little piece).

Maybe I need another output size for fit_view=False or some additional steps?

r-m-n
  • 14,192
  • 4
  • 69
  • 68
John Tracid
  • 3,836
  • 3
  • 22
  • 33

1 Answers1

1

Today I ran into the same problem.

It seems that you can use fit_view=0.9, and by using a float number yo can scale the fit. In that case it would appear 90% than the normal size. If you use 1, will be the same size.

Hope it helps.

Larckov
  • 45
  • 8