Weighted Digraph

107 views
Skip to first unread message

darshan

unread,
Oct 29, 2009, 12:42:47 PM10/29/09
to networkx-discuss
Hi,

I want to draw weighted digraph with weights on both nodes and egdes.
Is it possible?

Also add_weighted_edges_from doesn't seem to work from me.
It says:

Traceback (most recent call last):
G.add_weighted_edges_from([(0,1,3.0),(1,2,7.5)])
AttributeError: 'Graph' object has no attribute
'add_weighted_edges_from'

add_edges_from doesn't accept weight.
G.add_edges_from([(0,1,3.0),(1,2,7.5)])
File "/var/lib/python-support/python2.6/networkx/graph.py", line
365, in add_edges_from
(u,v)=e
ValueError: too many values to unpack


Please help.

Thanks
Darshan

darshan

unread,
Oct 30, 2009, 3:57:22 PM10/30/09
to networkx-discuss
This is resolved partially.

However, is there a way to give weights to the nodes.
Reply all
Reply to author
Forward
0 new messages