Search code examples
graphviz

How to draw a weighted graph with snap.py?


I want to draw a network which can show the weight of each edge.

Currently, I was able to draw an unweighted graph using PUNGraph of SNAP.

G = snap.PUNGraph.New()

enter image description here

However, I wasn't able to find the class for the weighted graph.
I don't want to just put the value above the edge, I want to somehow resize the edge base on the value of the edges.

Could someone tell me how I can draw graph something like below?

If possible I would like a solution using SNAP.

enter image description here


Solution

  • I end up using nodeXL which is capable of drawing a graph likes below. Also D3.js supports a lot of good representing features.

    I am still looking for more fascinating tools.

    enter image description here