python-igraph icon indicating copy to clipboard operation
python-igraph copied to clipboard

edge_label with matplotlib

Open tbuglc opened this issue 3 years ago • 3 comments

Is there a feature to display edge attributes with Matplotlib as with Cairo.

With Cairo

g.es["label"] = g.es["weight"]

works perfectly however, adding this line below in visual_style never worked.

visual_style = {
 "edge_label": g.es["weight"],

}

tbuglc avatar Aug 04 '22 17:08 tbuglc

I tested the code from tutorial's gallery for shortest path and this is what I got igraph

vs on tutorial's result

igraph-2

Any idea what might be wrong?

I run the test on Windows 11 Home and I tested on MacOSX as well with no luck

tbuglc avatar Aug 04 '22 23:08 tbuglc

Could you please try the develop branch of python-igraph?

iosonofabio avatar Aug 05 '22 04:08 iosonofabio

I'll try it out over this week and update you

tbuglc avatar Aug 08 '22 07:08 tbuglc

I just tried the compiling from develop branch and it seems to work well. Could we have it on PyPI release as well?

tbuglc avatar Aug 17 '22 19:08 tbuglc

We redesigned the whole plotting interface in develop so it's not easy to do that. Version 0.10 of the C core is out as pre-release and will be released ASAP, after that python-igraph 0.10 will follow in a matter of days (I hope).

iosonofabio avatar Aug 18 '22 06:08 iosonofabio

Yes, that's the plan. If things go according to plan, igraph 0.10 will be released as soon as I get back from holidays in September, and the Python interface will follow in a day or two.

ntamas avatar Aug 22 '22 13:08 ntamas

Alright, thank you all. We'll be waiting then.

tbuglc avatar Aug 22 '22 14:08 tbuglc