# plot results plt.scatter(x, y) plt.plot(x, y_pred, linewidth=2) plt.grid(True) plt.xlabel('x') plt.ylabel('y') plt.title('x vs y') plt.show()