pythongraphnetworkxhvplot

hvplot.networkx does not render edges python


I created a graph from a street network using NetworkX. I can easily use nx.draw

plt.figure(figsize=(20, 18))
nx.draw(g, {n:[n[0], n[1]] for n in list(g.nodes)},  node_size=15)
plt.title('Major roads', size=15)
plt.show()

and it looks like

enter image description here

I would like to have a interactive visualisation, but when I use the hvplot.networkx, edges are not drawn.

hvnx.draw(g, pos={n:[n[0], n[1]] for n in list(g.nodes)} )

enter image description here


Solution

  • One option to try is to specify node_size=0:

    hvnx.draw(g, pos={n:[n[0], n[1]] for n in list(g.nodes)}, node_size=0)