Skip to content

Instantly share code, notes, and snippets.

@mzsima
Last active May 22, 2020 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzsima/82b1921295df595e61a8e201a6026526 to your computer and use it in GitHub Desktop.
Save mzsima/82b1921295df595e61a8e201a6026526 to your computer and use it in GitHub Desktop.
[networkX] ただの三角

image

snapshot

code jupyter notebook

%matplotlib inline
import matplotlib.pyplot as plt
import networkx as nx
G = nx.Graph()

G.add_node('A')
G.add_nodes_from(['B', 'C'])

G.add_edge('A', 'B')
G.add_edges_from([('B', 'C'), ('A', 'C')])

plt.figure(figsize=(7.5, 7.5))
nx.draw_networkx(G)
plt.show()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment