I want to plot the lines between the data points on my linear regression and the line of best fit. Looking to create the grey lines in the attached image.
CodePudding user response:
Here is a minimal working example.
In summary, the points are a scatter
, the fit line is computed with