networkXの使い方

最終更新: 2017-09-14 10:43

import networkx as nx
import matplotlib.pyplot as plt

G = nx.DiGraph()
G.add_node('hoge')
G.add_node('fuga')
pos = nx.spring_layout(G)
nx.draw_networkx(G, pos)
plt.show()