I am using graph-tool on Python 3.5.1. I have a graph of words, with edges between words that rhyme. When I use graph-tool's draw function, it causes all the vertices to overlap if I make the vertices too large, but if they are too small, I must make the font smaller, and then it is illegible. Is there any way of setting a minimum edge length or forcing the vertices not to overlap?
Code sample:
import graph_tool.all as gt
G = gt.load_graph("G.gt")
gt.graph_draw(G, vertex_text=G.vertex_properties.word, vertex_font_size=10, output_size=(1000, 1000), output="G.png", vertexsize=10)
Have you tried using graphviz_draw
? It has an overlap
setting where you can tell the software to prevent vertices from touching. The syntax is different for the function so you may need to do some searching but if you look at the graphviz documentation linked in the graph-tool manual you should be able to find all your attributes (http://www.graphviz.org/doc/info/attrs.html ).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With