'Seaborn - ScatterPlot with Average Y-axis
I have written the below code in the seaborn scatterplot for the visual to create
sns.scatterplot(x="Year_Birth", y="NumStorePurchases", data=md)
I get the plot in the format below
I now need the average of the Y- axis and want to adjust the plot to look like the below picture
I have tried using the np.mean in the estimator but it has not worked out. Is there something that is being wrongly done? How this can be achieved?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


