Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于给定的 seaborn 图,我们如何将回归线 y 轴限制在 5 以内。 评级永远不会超过 5。有没有办法截断/剪辑它?sns.regplot(x="评论", y="评级", 数据=df);
g = sns.regplot(x="Reviews", y="Rating", data=df); g.set(ylim=(None, 5)) plt.title('Rating VS Reviews')
sns.regplot(x="Reviews", y="Rating", data=df) sns.plt.ylim(0, y_lim)
y_lim根据您的要求更改值
y_lim