1.常见绘图套路代码
# 绘制折线图
plt.plot(x_train, tmp_f_wb, c='b',label='Our Prediction')
# 绘制散点图
plt.scatter(x_train, y_train, marker='x', c='r',label='Actual Values')
# Set the title 设置标题
plt.title("Housing Prices")
# Set the y-axis label 设置y轴
plt.ylabel('Price (in 1000s of dollars)')
# Set the x-axis label 设置x轴
plt.xlabel('Size (1000 sqft)')
plt.legend()