import matplotlib.pyplot as plt
import networkx as nx
G = nx.star_graph(30)
pos = nx.spring_layout(G)
colors = range(30)
nx.draw(G, pos, node_color=’#A0CBE5’, edge_color=colors,
width=4, edge_cmap=plt.cm.copper, with_labels=True)
plt.show()
nx.draw(G, pos, node_color=’#A0CBE5’, edge_color=colors,
width=4, edge_cmap=plt.cm.copper_r, with_labels=True)
nx.draw(G, pos, node_color=’#A0CBE5’, edge_color=colors,
width=4, edge_cmap=plt.cm.copper_r, with_labels=False)
nx.draw(G, pos, node_color=’#A0CBE5’, edge_color=colors,
width=4, edge_cmap=plt.cm.copper, with_labels=False)
nx.draw(G, pos, node_color=’#A0CBE5’, edge_color=colors,
width=4, edge_cmap=plt.cm.bone, with_labels=False)
nx.draw(G, pos, node_color=’#A0CBE5’, edge_color=colors,
width=4, edge_cmap=plt.cm.bone_r, with_labels=True)
nx.draw(G, pos, node_color=’#A0CBE5’, edge_color=colors,
width=4, edge_cmap=plt.cm.bone, with_labels=False)
nx.draw(G, pos, node_color=’#A0CBE5’, edge_color=colors,
width=4, edge_cmap=plt.cm.bone_r, with_labels=False)