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?
CodePudding user response:
If you only want one y-value for each x-value, you can create a sns.pointplot(...,orient='v')
. Note that a