Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matplotlib backend does not handle multigraphs / reciprocal edges #685

Closed
szhorvat opened this issue Jun 29, 2023 · 3 comments
Closed

matplotlib backend does not handle multigraphs / reciprocal edges #685

szhorvat opened this issue Jun 29, 2023 · 3 comments
Milestone

Comments

@szhorvat
Copy link
Member

szhorvat commented Jun 29, 2023

Describe the bug

Unlike the Cairo backend, the matplotlib backend does not handle multi-edges, or even reciprocal edges in directed graphs. Edges are plotted on top of each other, making it impossible to label or style them separately.

To reproduce

import igraph as ig
import matplotlib.pyplot as plt

g = ig.Graph([(0,1), (1,0), (1,2), (2,0)], directed=True)

fig, ax = plt.subplots()
ig.plot(g, target=ax)
image

Compare with Cairo:

ig.plot(g, bbox=(300,300))
image

Version information

Current main, 28647e7

@szhorvat
Copy link
Member Author

@iosonofabio I do see code for curved edges in the matplotlib backend. Is this a bug or a missing feature? Or is an explicit setting needed for curving edges?

@szhorvat
Copy link
Member Author

szhorvat commented Jun 30, 2023

#395 states that this used to work, so it appears that this is a regression? @ntamas, if so, can we squeeze a fix into 0.10.5? This is quite important functionality.

@szhorvat
Copy link
Member Author

FYI this still works correctly in the released 0.10.4 and is only broken on the latest main. This should be a blocker for the 0.10.5 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant