I have a scatterplot and I want to color it based on another value (naively assigned to np.random.random() in this case).
np.random.random()
Is there a way to use
import numpy as np import seaborn as sns import matplotlib.pyplot as plt x, y, z = np.random.rand(3, 100) cmap = sns.cubehelix_palette(as_cmap=True) f, ax = plt.subplots() points = ax.scatter(x, y, c=z, s=50, cmap=cmap) f.colorbar(points)