summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAric Hagberg <aric.hagberg@gmail.com>2011-05-20 19:54:46 -0600
committerAric Hagberg <aric.hagberg@gmail.com>2011-05-20 19:54:46 -0600
commit2dad35a7fb6f4daa80b7f760889013fd8eb54753 (patch)
tree04e90c3846494a3b9fe159e4322f0134c48e2b0b /examples
parent48ca19380ad70cbf3de47e0932ef9ae2a9f05dde (diff)
downloadnetworkx-2dad35a7fb6f4daa80b7f760889013fd8eb54753.tar.gz
Update exmple for node position in new RGG interface.
Diffstat (limited to 'examples')
-rw-r--r--examples/drawing/random_geometric_graph.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/drawing/random_geometric_graph.py b/examples/drawing/random_geometric_graph.py
index 1b7c6741..d39fec6f 100644
--- a/examples/drawing/random_geometric_graph.py
+++ b/examples/drawing/random_geometric_graph.py
@@ -2,7 +2,8 @@ import networkx as nx
import matplotlib.pyplot as plt
G=nx.random_geometric_graph(200,0.125)
-pos=G.pos # position is stored as member data for random_geometric_graph
+# position is stored as node attribute data for random_geometric_graph
+pos=nx.get_node_attributes(G,'pos')
# find node near center (0.5,0.5)
dmin=1