首页 > 解决方案 > Seaborn jointplot 关闭其中一个边际地块

问题描述

有没有办法关闭 Seaborn Jointplot 中的顶部边缘图?

tips = sns.load_dataset('tips')
g = sns.jointplot(
    data=tips,
    x="total_bill",
    y="tip",
    hue="smoker",
)

在此处输入图像描述

标签: pythonseaborn

解决方案


也许只是remove呼吁.ax_marg_x

g.ax_marg_x.remove()

输出:

在此处输入图像描述

(请注意,ax_marg_yax_joint是剩余的图,如JointGrid文档中所述)。


推荐阅读