绘制折线图
from matplotlib import pyplot
import matplotlib.pyplot as plt
names = range(2, 8)
names = [str(x) for x in list(names)]
x = range(len(names))
y1 = []
y2 = []
y3 = []
plt.plot(x, y1, marker='*', mec='r', mfc='w', label='max')
plt.plot(x, y2, marker='*', ms=10, label='min')
plt.plot(x, y3, marker='*', ms=10, label='average')
plt.legend()
plt.xticks(x, names, rotation=1)
plt.margins(0)
plt.subplots_adjust(bottom=0.10)
plt.xlabel('')
plt.ylabel("")
pyplot.yticks([0, 5, 10, 15, 20, 25, 30])
plt.title("标题")
plt.savefig('地址\\名称', dpi=900)