matplotlib.pyplot.hist参数详解
实例理解
一、什么是直方图?
直方图分为频数直方图和频率直方图,为理解什么是直方图,大家可先熟悉如下专有名词。...若为True,当density为False时直方图显示累计频数,当density为True时直方图显示累计频率。
bottom:数值或数组序列,默认为None。..., 9800, 10400]
#公司员工薪资数据
fig = plt.figure()
ax = fig.add_subplot(111)
#创建图形框架
numBins = [0,4000,6000,10000...#创建图形
numBins = [0,4000,6000,10000]
#直方图的分割区间
ax.hist(salary, numBins, rwidth=0.9)
plt.title(u'公司员工薪水直方图...若为True,当density为False时直方图显示累计频数,当density为True时直方图显示累计频率。