【发布时间】:2021-07-01 10:22:51
【问题描述】:
我有一个散点图,其中数据的下限为零(两个轴)。然而,当用 lmplot 绘制回归线时,我在 y 轴上得到线和 CI 的负值。有没有办法在 y 轴上绑定 regline 和 CI?
使用的代码:
ax1 = sns.lmplot(x=x, y=y, hue=z, data=df, fit_reg=False,
scatter_kws={'s':70}, height=7, aspect=1.2,
legend=False, palette=colors)
sns.regplot(x=x, y=y, data=df, scatter=False, ax=ax1.axes[0, 0], color='grey')
ax1.set(ylim=(-2, None))
【问题讨论】:
标签: python matplotlib plot seaborn