Here is my effort to plot a pairgrid plot that use the kdeplot in the lower part with 2 hues:
My script is:
import seaborn as sns
g = sns.PairGrid(df2,hue='models')
g.map_upper(plt.scatter)
g.map_lower(sns.kdeplot)
g.map_diag(sns.distplot)
Is there a way in seaborn 0.6.0 to use more color scales in the kdeplot of map_lower according to hue?
In this case, hue has only 2 values. Maybe I'm missing something obvious.
As seen in Martin's example, a wrapper function needs to be created to instruct
sns.kdeplot
on what color maps to use. Here is a similar example that should be easier to understand:The color map takes in the color based on the pallet. The default pallet is green - (0., 0., 1.) and blue - (0., 0.5, 0.). However, we are using the above pallet which has different RBG tuples.