Plotting: multiple self-loops on a vertex are plotted on top of each other
When a vertex has multiple self-loops, they are plotted on top of each other. The graphs 0-0 and 0-0, 0-0 are not visually distinguishable when plotted.
These two graphs look the same:
plot(Graph([(0,0),(0,0)]))
plot(Graph([(0,0)]))
Related: https://github.com/igraph/rigraph/issues/407
I realize this is not easy. For some inspiration, Mathematica visualizes these like this:
As you can see, a nice solution will consider not only other self loops, but also the position of other non-loop edges.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
Is this still present in the matplotlib interface?
The Matplotlib backend seems to be better in handling multiple self-loops; just tested this now in Google Colab.
Is this still present in the matplotlib interface?
Yes, here's an example:
ig.plot(ig.Graph.Formula('a-b-c-c-c-c-a-b', simplify=False))
Is this the develop branch? If not please test with that
Yes, it is with the latest develop branch.
Should this work? I vaguely remembered that you fixed this, so I was actually surprised to see that it didn't work.
@iosonofabio I remembered correctly, you did fix it. It works in the released version, but it does not work on develop. Here's what I get with 0.9.8:
ig.plot(ig.Graph.Formula('a-b-c-c-c-c-a-b', simplify=False), target=plt.axes())