You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When plotting a graph/matrix, reciprocal directed edges overlap. The result is that only the weight of one of them is visible, which is confusing. I believe NetworkX does support curved edges, which could be a solution. However, generally, visualization does not seem to be a priority for NetworkX, so perhaps it's not the best idea to rely on it in the long term.
Yeah, this isn't good. This version of draw was part of the initial PoC that @jim22k created years ago. We do plan to give vizualization a revamp and to show examples by including notebooks in the docs (#407), b/c viz is great for user applications and make great examples.
It might be nifty to be able to use netgraph or graph-tool (or ...) for viz.
In case you're considering multiple viz backends, igraph does have good supports for both self-loops and multi-edges, and how has a matplotlib back-end.
I'm sorry about that, it seems that contrary to my memory, multi-edge handling is not yet implemented with the matplotlib backend. It does work with the Cairo backend.
@eriknw I need to correct myself again. It seems that multigraph plotting in igraph is broken in the development version, but it's working fine in the released version. Python is not my main language, so I was a bit confused.
To be clear: Yes, multigraph plotting works fine in igraph with either the Cairo or matplotlib backends.
Example:
import igraph as ig
import matplotlib.pyplot as plt
g = ig.Graph([(0,1), (1,0), (1,2), (2,0)], directed=True)
import matplotlib.pyplot as plt
fig, ax= plt.subplots()
ig.plot(g, edge_label=['a','b','c','d'], target=ax)
Activity
eriknw commentedon Jun 26, 2023
Yeah, this isn't good. This version of
drawwas part of the initial PoC that @jim22k created years ago. We do plan to give vizualization a revamp and to show examples by including notebooks in the docs (#407), b/c viz is great for user applications and make great examples.It might be nifty to be able to use
netgraphorgraph-tool(or ...) for viz.I think @paul-tqh-nguyen may be interested in looking into visualization
szhorvat commentedon Jun 26, 2023
In case you're considering multiple viz backends, igraph does have good supports for both self-loops and multi-edges, and how has a matplotlib back-end.
eriknw commentedon Jun 29, 2023
Thanks for letting us know about viz in
igraph!After a quick scan of examples, it's not clear to me how viz from
igraphwould be able to handle showing the edge attributes of reciprocal edges any better: https://python.igraph.org/en/latest/tutorials/index.htmlszhorvat commentedon Jun 29, 2023
I'm sorry about that, it seems that contrary to my memory, multi-edge handling is not yet implemented with the matplotlib backend. It does work with the Cairo backend.
szhorvat commentedon Jun 30, 2023
@eriknw I need to correct myself again. It seems that multigraph plotting in igraph is broken in the development version, but it's working fine in the released version. Python is not my main language, so I was a bit confused.
To be clear: Yes, multigraph plotting works fine in igraph with either the Cairo or matplotlib backends.
Example:
eriknw commentedon Jul 11, 2023
Nice, thanks!
Fix viz.datashade cell positioning and separate reciprocal edges in v…
Fix viz.datashade cell positioning and separate reciprocal edges in v…