# 05 使用特殊风格
from matplotlib import pyplot as plt
plt.xkcd()
plt.figure(figsize=(16,10),dpi=100)
plt.rcParams['font.sans-serif']=['Microsoft YaHei'] # 使用微软雅黑的字体
plt.rcParams.update({'font.family': "Microsoft YaHei"})
plt.title("中国票房2021TOP5")
plt.plot(bo,prices,'r^--',label='票房与票价')
plt.plot(bo,persons,'g*-',label='票房与人次')
plt.plot(bo,points,color='blue',marker='o',markersize=10,label='票房与评价')
plt.legend() # 显示标签
plt.xlabel('票房') # 横坐标轴标题
plt.ylabel('行情') # 纵坐标轴标题
plt.grid()
plt.savefig("cnbotop5_300.png")
plt.show()