I have three quantities, x, y, z
, which I would like to see the distribution of two of them and have the value of the third one as color of each point. I use seaborn.jointplot
to plot distributions of x
and y
and use the z
as the color parameter in the jointplot
. But, still I need to change the color palette and add a colorbar somewhere outside the plot. This is a minimal example of what I did:
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
x = np.random.normal(loc=0, scale=1, size=1000)
y = np.random.normal(loc=0, scale=1, size=1000)
z = x**2 + y**2
plt.figure(num=1, figsize=(8, 5))
sns.jointplot(x=x, y=y, c=z, joint_kws={"color":None})
plt.show()