Reputation: 4017
When using seaborn.jointplot
with a Kernel Density Estimation, the background of the KDE does not span the whole background of the figure, resulting in ugly white margins, as shown here:
Curiously, this only happens when I use stat_func=None
. This is my calling command:
sns.jointplot(x=data[:,1], y=data[:,2],
kind="kde", space=0, color='blue', stat_func=None);
Ideally, I would like to have the blue background cover all the background so that I could also use xlim
and ylim
keywords. Alternatively, if I could crop the margins to where the KDE extends, it would suffice.
Upvotes: 3
Views: 2128
Reputation: 49064
As mentioned in the comments, passing joint_kws={'shade_lowest':False}
solves this issue.
Upvotes: 3