Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5197cc0

Browse files
authored
[Fix] Fix typo (G.node -> G.nodes)
Fixing typo in Create Edges example code. (G.node -> G.nodes)
1 parent64e3bc0 commit5197cc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎python/network-graphs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ Add edges as disconnected lines in a single trace and nodes as a scatter trace
6363
edge_x= []
6464
edge_y= []
6565
for edgein G.edges():
66-
x0, y0= G.node[edge[0]]['pos']
67-
x1, y1= G.node[edge[1]]['pos']
66+
x0, y0= G.nodes[edge[0]]['pos']
67+
x1, y1= G.nodes[edge[1]]['pos']
6868
edge_x.append(x0)
6969
edge_x.append(x1)
7070
edge_x.append(None)
@@ -81,7 +81,7 @@ edge_trace = go.Scatter(
8181
node_x= []
8282
node_y= []
8383
for nodein G.nodes():
84-
x, y= G.node[node]['pos']
84+
x, y= G.nodes[node]['pos']
8585
node_x.append(x)
8686
node_y.append(y)
8787

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp