Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Edge color for undirected multiedge graphs

It seems that there is a bug with specifying the color of undirected multiedges. Here's an example:

G=graphs.PathGraph(2)
G.allow_multiple_edges(True)
G.add_edge((0,1))
G.plot(edge_colors={"red":[(1,0)]})

The graph plotted has then four edges, two black and two red. It seems that the multiedge to be colored red is seen as a different one than the already present one, even though they are actually the same since the graph is undirected. I get the intended plot if I change the last line to:

G.plot(edge_colors={"red":[(0,1)]})