I have used spline interpolation to smooth a time series and would also like to add a horizontal line to the plot. But there seems to be an issue that is out of my grips. An
A nice and easy way for those people who always forget the command axhline is the following
axhline
plt.plot(x, [y]*len(x))
In your case xs = x and y = 40. If len(x) is large, then this becomes inefficient and you should really use axhline.
xs = x
y = 40