简体   繁体   中英

Plot uniform background color with seaborn jointplot

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.

正如评论中提到的,通过joint_kws={'shade_lowest':False}解决了这个问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM