col = np.array([2, 4, 4, 1, 3, 4, 3, 3, 4, 1, 4, 3, 2, 4, 1, 1, 2, 2, 3, 1])
df = pd.DataFrame({'V': x, 'Distance': y, 'col': col})
cmap = sns.diverging_palette(20, 220, as_cmap=True)
colors = sns.diverging_palette(20, 220, n=4)
g = sns.JointGrid('V', 'Distance', data=df, ratio=2)
g = g.plot_joint(plt.scatter, c=df['col'], edgecolor='black', cmap=cmap)
for c in df['col'].unique():
    sns.kdeplot(df['Distance'][df['col'] == c], ax=g.ax_marg_y, vertical=
        True, color=colors[c - 1], shade=True)
sns.kdeplot(df['V'][df['col'] == c], ax=g.ax_marg_x, vertical=False, color=
    colors[c - 1], shade=True)
seaborn plot_marginals несколько kdeplots