Getting extra network edges in the plot

Here is the slightly adapted code from here.

import networkx as nx
import hvplot.networkx as hvnx

G = nx.DiGraph()

G.add_edge('a', 'b', Polarity=0.1)
G.add_edge('a', 'c', Polarity=0.1)
G.add_edge('c', 'd', Polarity=0.1)
G.add_edge('c', 'e', Polarity=0.6)
G.add_edge('c', 'f', Polarity=0.6)
G.add_edge('a', 'd', Polarity=0.6)

elarge = [(u, v) for (u, v, attr) in G.edges(data=True) if attr['Polarity'] > 0.5] 
esmall = [(u, v) for (u, v, attr) in G.edges(data=True) if attr['Polarity'] <= 0.5]

pos = nx.spring_layout(G)  # positions for all nodes

# nodes
nodes = hvnx.draw_networkx_nodes(G, pos, node_size=700)

# edges
edges1 = hvnx.draw_networkx_edges(
    G, pos, edgelist=elarge, edge_width=6)
edges2 = hvnx.draw_networkx_edges(
    G, pos, edgelist=esmall, edge_width=6, alpha=0.5, edge_color='blue', style='dashed')
labels = hvnx.draw_networkx_labels(G, pos, font_size=20, font_family='sans-serif')

edges1 * edges2 * nodes * labels

bokeh_plot3
Edge (c, d) should not be solid in this case, and Edge (a, d) (needs closer look to see) should not be dashed according to the logic.

but the result show these extra edges which shouldn’t be there according to condition. It’s producing knock on effects for me. Will really appreciate any help. Please have a look.

The networkx only generated graph seems to work ok. It’s here Weighted Graph — NetworkX 3.1rc1.dev0 documentation.

But for some reason hvplot or something else is causing this problem. When I use with my example.

If you believe this is a bug, please file an issue on hvplot. Thanks!

Do you mean to open an issue on Github? or here on discourse? Thanks

Bugs go on github; discussions go on discourse. Issues · holoviz/hvplot · GitHub
Thanks!

I’ve opened an issue on github. There hasn’t been any update on it or here. I also tried on stackoverflow and got no response. Could you please help to direct it to the right person. I tried reaching to Philipp a week ago but haven’t got a reply yet. Thank you

Please do not ever reach out to a developer personally unless you are offering to hire them for some work. Philipp is not an on-call support person for you or any other user; this is an open-source project offered in the hope that it will be of value, without any warranty or guarantee or promise of support.

As a user, reporting issues is a useful contribution you can make to the project, and fixing them is an even more useful contribution you could make. If fixing it is not something you are able to do, please rest assured that in reporting it you have done your duty, and hopefully at some point other developers will review your issue, attempt to replicate it, and attempt to fix it if it is indeed a bug.

Thank you for your patience and intention to help. Looking forward to any update on this. I’ll add it if I find a solution myself but no solution so far. Unsure whether it is infant a bug, i couldn’t locate problem with code. Thanks.