GRL Ex 5.ipynb - Colaboratory
GRL Ex 5.ipynb - Colaboratory
# Set layouts
layouts = ['circular', 'spring', 'shell', 'kamada_kawai']
G_layouts = {layout: nx.layout.__getattribute__(layout + '_layout') for layout in layouts}
# Create colorbar
plt.colorbar(edge_sm, label='Edge Weight' if graph_name == 'Weighted Graph' else 'Edge
plt.title(graph_name)
plt.show()
<ipython-input-5-c47363bd71df>:39: MatplotlibDeprecationWarning: The get_cmap fu
edge_colormap = cm.get_cmap('RdYlBu', len(G_weighted.edges))
<ipython-input-5-c47363bd71df>:42: MatplotlibDeprecationWarning: The get_cmap fu
node_colormap = cm.get_cmap('Greens', len(G_weighted))
<ipython-input-5-c47363bd71df>:59: MatplotlibDeprecationWarning: Unable to dete
plt.colorbar(edge_sm, label='Edge Weight' if graph_name == 'Weighted Graph' el