.. _imnetworkxrst: ======== networkx ======== .. only:: html **Links:** :download:`notebook `, :downloadlink:`html `, :download:`PDF `, :download:`python `, :downloadlink:`slides `, :githublink:`GitHub|_doc/notebooks/2016/pydata/im_networkx.ipynb|*` *networkx* draws networks. It does not work too well on big graphs (< 1000 vertices). `documentation `__ `source `__ `installation `__ `tutorial `__ `gallerie `__ .. code:: ipython3 from jyquickhelper import add_notebook_menu add_notebook_menu() .. contents:: :local: .. code:: ipython3 %matplotlib inline example ------- .. code:: ipython3 import networkx as nx import matplotlib.pyplot as plt G=nx.random_geometric_graph(200,0.125) # 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 ncenter=0 for n in pos: x,y=pos[n] d=(x-0.5)**2+(y-0.5)**2 if d