I want to make a graph without overlapping edges. I am using python with the igraph libray. This is my code
import sys
import igraph
from igraph import *
import re
g = Graph([(1,2),(1,4),(1,7),(1,10),(1,12),(2,3),(2,4),(2,9),(3,4),(3,5),
(5,6)
layout = g.layout_reingold_tilford_circular()
plot(g, layout=layout)
And this is the result
but I want something like this
Any help about how I can do it in igraph? My graph is not a tree.
Thanks
layout_reingold_tilford
and layout_reingold_tilford_circular
are tree layouts; they are meant for tree graphs. You are probably better off with layout_kamada_kawai()
or layout_fruchterman_reingold()
.
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