matplotlib.pyplot.hist(x, bins=None, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype=’bar’, align=’mid’, orientation=’vertical’, rwidth=None, log=False, color=None, label=None, stacked=False, hold=None, data=None, **kwargs)
Parameters:
x : (n,) array or sequence of (n,) arrays(可以是一个array也可以是多个array)
integer or array_like or ‘auto’, optional(可以是整型来设置箱子的宽度,也可以是array,指定每个箱子的宽度)
range : tuple or None, optional(设置显示的范围,范围之外的将被舍弃)
normed : boolean, optional(?)
weights : (n, ) array_like or None, optional(?)
cumulative : boolean, optional(?)
bottom : array_like, scalar, or None(?)
histtype : {‘bar’, ‘barstacked’, ‘step’, ‘stepfilled’}, optional(选择展示的类型,默认为bar)
align : {‘left’, ‘mid’, ‘right’}, optional(对齐方式)
orientation : {‘horizontal’, ‘vertical’}, optional(箱子方向)
log : boolean, optional(log刻度)
color : color or array_like of colors or None, optional(颜色设置)
label : string or None, optional(刻度标签)
stacked : boolean, optional(?)
return
n : array or list of arrays(箱子的值)
bins : array(箱子的边界)
patches : list or list of lists