I am trying to add colorbarto my networkxdraw matplotlib axfrom a range 1(being the lightest) and 3(being the darkest) [check w / cmapbelow line]. I am trying to combine many features PyData.
How to add a function like a color bar on a networkx graph using a palette with sea colors?

# Set up Graph
DF_adj = pd.DataFrame(np.array(
[[1, 0, 1, 1],
[0, 1, 1, 0],
[1, 1, 1, 1],
[1, 0, 1, 1] ]), columns=['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)'], index=['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)'])
G = nx.Graph(DF_adj.as_matrix())
G = nx.relabel_nodes(G, dict(zip(range(4), ['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)'])))
# Color mapping
color_palette = sns.cubehelix_palette(3)
cmap = {k:color_palette[v-1] for k,v in zip(['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)'],[2, 1, 3, 2])}
# Draw
nx.draw(G, node_color=[cmap[node] for node in G.nodes()], with_labels=True)
In this they all use color palettes matplotlib: http://jakevdp.imtqy.com/mpl_tutorial/tutorial_pages/tut3.html I even tried to convert them to an object ListedColormapbut it didn’t work.
This does not work for my situation either b / c matplotlib colormap: Marine regplot with color bar
http://matplotlib.org/examples/pylab_examples/colorbar_tick_labelling_demo.html
, . Nonetype: seaborns color_palette matplotlib?