# 导入模板
import numpy as np
import matplotlib.pyplot as plt
# 添加子图
fig=plt.figure()
ax=fig.add_subplot(111)
# 设置数据
x=np.arange(3,10)
y_max = np.array([30,33,35,36,33,31,29,])
y_min = np.array([21,19,20,22,22,21,22,])
# 绘制折线图
plt.plot(x,y_max,color='red')
plt.plot(x,y_min,color='black')
plt.show()
#展示图表
plt.show()
运行结果