import 网页链接 as plt
from pylab import * #支持中文
mpl.rcParams['font.sans-serif'] = ['SimHei']
names = ['5', '10', '15', '20', '25']
x = [5,10,15,20,25,30,35,40,45,50]
y = [586,291,198,143,101,98,72,68,59,55]
plt.plot(x, y, 'b-')
pl.xlim(-1, 11) # 限定横轴的范围
pl.ylim(-1, 110) # 限定纵轴的范围
plt.plot(x, y, marker='o', mec='r', mfc='r')
plt.xticks(x, names, rotation=20)
plt.margins(0)
plt.subplots_adjust(bottom=0.15)
plt.xlabel(u"time(s)邻居") #X轴标签
plt.ylabel("RMSE") #Y轴标签
plt.title("test") #标题
plt.show()
from pylab import * #支持中文
mpl.rcParams['font.sans-serif'] = ['SimHei']
names = ['5', '10', '15', '20', '25']
x = [5,10,15,20,25,30,35,40,45,50]
y = [586,291,198,143,101,98,72,68,59,55]
plt.plot(x, y, 'b-')
pl.xlim(-1, 11) # 限定横轴的范围
pl.ylim(-1, 110) # 限定纵轴的范围
plt.plot(x, y, marker='o', mec='r', mfc='r')
plt.xticks(x, names, rotation=20)
plt.margins(0)
plt.subplots_adjust(bottom=0.15)
plt.xlabel(u"time(s)邻居") #X轴标签
plt.ylabel("RMSE") #Y轴标签
plt.title("test") #标题
plt.show()