import matplotlib.pyplot as plt
import matplotlib as mpl
import time
mpl.rcParams["font.sans-serif"] = ['SimHei']
# mat plot library
# 修密码机
hero_num = [1,2,3,4]
speed = [70,75,85,60]
name =["前锋"," 佣兵","守墓人","野人"]
# 折线图
# plt.plot(hero_num,speed)
# 柱状统计图 bar
plt.bar(hero_num,speed)
# 横坐标标题
plt.xlabel("职业")
plt.ylabel("破译效率")
plt.title("庄园四猛男")
# 文字 text
plt.text(3.5,85,"%s"%time.strftime("%m-%d %H:%M",time.localtime()))
# 显示 show
plt.show()
deqin - 学习数据分析
最新推荐文章于 2021-02-19 17:03:40 发布