In this recipe, we will show how to create, manipulate, and visualize graphs with NetworkX.
You can find the installation instructions for NetworkX in the official documentation at http://networkx.github.io/documentation/latest/install.html.
With Anaconda, you can type
conda install networkx in a terminal. Alternatively, you can type
pip install networkx. On Windows, you can also use Chris Gohlke's installer, available at www.lfd.uci.edu/~gohlke/pythonlibs/#networkx.
In : import numpy as np import networkx as nx import matplotlib.pyplot as plt %matplotlib inline