Hi, I am producing a decision tree with many leaves. I use edge labels to represent probabilities of edges. But because there are so many leaves, the labels most of the time are on top of each other. So I am wondering if I can make these edge labels parallel to each edge so that it won’t be on top of each other.

I have attached my code here.

from igraph import *

g = Graph()

g.add_vertices(364)

for i in range(121):

g.add_edges([[i, 3*i+j] for j in range(1, 4)])

g.vs[‘color’] = [‘black’] + [’#FFA6B3’, ‘#80D4FF’, ‘#C3DF86’] * (sum(3**i for i in range(0, 5)))

g.es[‘label’] = [‘xxxxxxx’ for i in range(364)]

layout = g.layout(‘rt_circular’, root=0)

plot(g, layout = layout, bbox=[1500, 1500])