I have the following code sample, where I need to draw a green line, as shown inside the plot below:
fig = plt.figure(figsize = (12,6))
plt.scatter((y - y_pred), y_pred , color = 'red')
plt.axhline(y=0, color='r', linestyle=':')
plt.ylim(0,50)
plt.xlim(-4,6)
p = sns.lineplot([-4,6],[25,25],color='g')
plt.ylabel("Predictions")
plt.xlabel("Residual")
p = plt.title('Homoscedasticity Check')
plt.show()
Although the code above worked some time back, it doesn't seem to execute now, and I observe the following error:
TypeError: lineplot() takes from 0 to 1 positional arguments but 2 were given
What could be wrong here ? For example, what is the right format to indicate where the Green line should appear ?