for i in range(0, G.size()):
nx.draw_networkx_edges(G,pos,edgelist=G.edges, width = ll[i] )
it gives me an error about edges. ll is a vector containing the
weights of the edges (I have different weights for different edges).
Do you know another way to do it?
Thanks
Bob
unread,
Dec 7, 2010, 2:59:03 PM12/7/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to networkx-discuss
I tried this
for i in range(0, len(G.edges())):
nx.draw_networkx_edges(G,pos, edgelist=G.edges()[i]), width =
G.edges(data=True)[i][2]['weight'] )
and it doesn't work..
Aric Hagberg
unread,
Dec 7, 2010, 3:40:59 PM12/7/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to networkx...@googlegroups.com
On Tue, Dec 7, 2010 at 1:28 PM, Bob <roberto....@gmail.com> wrote: > I tried this > > for i in range(0, len(G.edges())): > nx.draw_networkx_edges(G,pos, edgelist=G.edges()[i]), width = > G.edges(data=True)[i][2]['weight'] ) > > and it doesn't work..
Try
import networkx as nx import matplotlib.pyplot as plt G=nx.path_graph(4) width=range(1,4) nx.draw(G,width=width) plt.show()