We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e68216e commit 5bbe0e0Copy full SHA for 5bbe0e0
1 file changed
modules/networks/fundamentals.qmd
@@ -398,7 +398,11 @@ edge_list = [
398
# Create a graph from the edge list
399
G_actors = nx.from_edgelist(edge_list)
400
# Draw the graph
401
-pos = nx.spring_layout(G_actors)
+pos = nx.spring_layout(G_actors, k=0.15, iterations=20)
402
+# k controls the distance between the nodes and varies between 0 and 1
403
+# iterations is the number of times simulated annealing is run
404
+# default k=0.1 and iterations=50
405
+
406
nx.draw(
407
G_actors,
408
pos=pos,
0 commit comments