import networkx
import matplotlib.pyplot as plt
G=networkx.Graph()
G.add_node(1)
G.add_node(2)
G.add_node(3)
G.add_node(4)
G.add_node(5)
print(G.nodes())
G.add_node(6)
print(G.nodes())
G.add_edge(1,2)
G.add_edge(1,3)
G.add_edge(4,6)
G.add_edge(5,4)
G.add_edge(2,3)
print(G.edges())
G.add_edge(2,6)
print(G.edges())
#networkx.draw(G,with_labels=1)
z=networkx.complete_graph(100)
print(z.nodes())
print(z.edges())
print(z.order())
print(z.size())
#networkx.draw(z)
p=networkx.gnp_random_graph(20,0.5)
networkx.draw(p)
plt.show()