赞
踩
一:对不同地区种类图书采购情况
import numpy as np import matplotlib.pyplot as plt plt.rcParams["font.sans-serif"] = ["SimHei"] plt.rcParams["axes.unicode_minus"] = False x = np.arange(5) y1 = [1200, 2400, 1800, 2200, 1600] y2 = [1050, 2100, 1300, 1600, 1340] bar_width = 0.6 tick_label = ["家庭", "小说", "心理", "科技", "儿童"] fig = plt.figure() ax = fig.add_subplot(111) ax.bar(x, y1, bar_width, color="#FFCC00", align="center", label ="地区1") ax.bar(x, y2, bar_width, bottom=y1, color="#B0C4DE", align="center", label="地区2") ax.set_ylabel("采购数量(本)") ax.set_xlabel("图书种类") ax.set_title(" 地区1和地区2对各类图书的采购情况") ax.grid(True, axis='y', color="gray", alpha=0.2) ax.set_xticks(x) ax.set_xticklabels(tick_label) ax.legend() plt.show()
二:国际外汇市场美元/人民币汇率走势
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams["font.sans-serif"] = ["SimHei"]
plt.rcParams["axes.unicode_minus"] = False
eurcny_2017 = np.array([6.8007, 6.8007, 6.8015, 6.8015, 6.8060, 6.8060
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。