画散点图
plt.scatter(x_test, y_test, s=1, color='red', label='实际数据')
参数s为散点图点的大小。 画折线图
plt.plot(xp1, reg1.predict(xp1), 'b-', label='回归曲线')
标题图例中添加汉字,见CSDN 标题
plt.title('SVR回归')
图例
plt.scatter(x_test, y_test, s=1, color='red', label='实际数据')
plt.plot(xp1, reg1.predict(xp1), 'b-', label='回归曲线')
plt.legend()
坐标轴信息
plt.xlabel('油门位移')
plt.ylabel('低压转子转速')