import matplotlib.pyplot as plt
#x与y轴数据
x = [300,500,700,900,1100,1300,1500]
y = [41,42,42,43,41,40,39]
# 绘图
plt.plot(x, # x轴数据
y, # y轴数据
linestyle = '-', # 折线类型,'.''-.'
linewidth = 3, # 折线宽度
color = 'b', # 折线颜色
markersize = 5, # 点的大小
markerfacecolor='g') # 点的填充色
# 添加标题和坐标轴标签
plt.xlabel('x轴标签')
plt.ylabel('y轴标签')
plt.show()
最终绘制图形如下:



