python 可视化之柱状图

plt.rcParams['font.sans-serif']=['SimHei']
plt.rcParams['axes.unicode_minus'] = False
plt.bar(np.arange(len(collect_total.催收结果.value_counts())),collect_total.催收结果.value_counts())
plt.title('催收结果')
plt.xlabel('催收结果')
plt.ylabel('数量')
plt.axis([-0.5,len(collect_total.催收结果.value_counts()),0,800])
for x,y in zip(np.arange(len(collect_total.催收结果.value_counts())),collect_total.催收结果.value_counts()):
    plt.text(x,y,y,ha="center",va="bottom")

 

你可能感兴趣的:(python 可视化之柱状图)