We use the scatter plot to examine three aspects of the association between the two variables:
Let $\hat{y}$ (y-hat) denote the predicted value (fitted value) of the response y, and x the explanatory variable. The equation of the regression line is given by
$$\hat{y} = a + bx $$
which is the proportion (percentage) of the variability in Y explained by the the regression.
import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
X = np.random.rand(100)
Y = X + np.random.normal(0,1,100)/10
X = np.append(X, 10).reshape(101,1)
Y = np.append(Y, 0.4).reshape(101,1)
from sklearn.linear_model import LinearRegression
regr = LinearRegression().fit(X,Y)
y_pred = regr.predict(X)
plt.scatter(X,Y)
plt.plot(X,y_pred, "r")