Ask Your Question
1

Edge color for undirected multiedge graphs

asked 7 years ago

Acksl gravatar image

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)]})
Preview: (hide)

Comments

Thank you for spotting this bug and reporting it. Thanks to David Coudert, this should be fixed in Sage 8.1 when it comes out.

slelievre gravatar imageslelievre ( 7 years ago )

1 Answer

Sort by » oldest newest most voted
2

answered 7 years ago

This is now ticket #24051

Preview: (hide)
link

Comments

Thank you for opening the ticket and providing a fix!

slelievre gravatar imageslelievre ( 7 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 7 years ago

Seen: 879 times

Last updated: Oct 13 '17