Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Graph: colored edge labels

I'm trying to plot a graph with labels on the edges as follows:

G = Graph(multiedges=True)
G.add_edges( [(0,1,'a'),(1,2,'b'),(2,3,'c'),(3,4,'b'),(4,0,'a')] )
H = G.plot(edge_labels=True, graph_border=True)
H.show()

Is it possible to color the edge labels, e.g. making the "a" red, "b" blue etc?