sns.set_palette(flatui)
my_cmap = ListedColormap(flatui)
N = 500
data1 = np.random.randn(N)
data2 = np.random.randn(N)
colors = np.linspace(0, 1, N)
plt.scatter(data1, data2, c=colors, cmap=my_cmap)
plt.colorbar()
plt.show()
How do I use seaborns color_palette as a colormap in matplotlib?