For the given seaborn plot, how do we set the regression line y-axis limit within 5.
The rating never crosses 5. Is there a way to truncate/clip it?
sns.regplot(x="Reviews", y="Rating", data=df);
Asked
Active
Viewed 1,192 times
1

Hari Prasad
- 1,162
- 1
- 10
- 11
2 Answers
2
g = sns.regplot(x="Reviews", y="Rating", data=df);
g.set(ylim=(None, 5))
plt.title('Rating VS Reviews')

Hari Prasad
- 1,162
- 1
- 10
- 11
0
sns.regplot(x="Reviews", y="Rating", data=df)
sns.plt.ylim(0, y_lim)
Change the value of y_lim
according to your requirements

Aayush Panda
- 544
- 4
- 15