带有边缘分布的线性回归#

../_images/regression_marginals.png

使用的seaborn组件: 设置主题(), 加载数据集(), 联合绘图()

import seaborn as sns
sns.set_theme(style="darkgrid")

tips = sns.load_dataset("tips")
g = sns.jointplot(x="total_bill", y="tip", data=tips,
                  kind="reg", truncate=False,
                  xlim=(0, 60), ylim=(0, 12),
                  color="m", height=7)