hist的使用
来源:互联网 发布:线下数据采集 编辑:程序博客网 时间:2024/06/06 21:23
hist的api参数很多,如果要知道每个含义得一个一个去试,看了doc,这个hist的参数挺多的,api中有个简明的例子,我们使用几个重要的参数即可
函数签名
x : (n,) array or sequence of (n,) arrays
这个参数是指定每个bin(箱子)分布的数据,对应x轴
bins : integer or array_like, optional
这个参数指定bin(箱子)的个数,也就是总共有几条条状图
normed : boolean, optional
If True, the first element of the return tuple will be the counts normalized to form a probability density, i.e.,n/(len(x)`dbin)
这个参数指定密度,也就是每个条状图的占比例比,默认为1
color : color or array_like of colors or None, optional
这个指定条状图的颜色
我们绘制一个10000个数据的分布条状图,共50份,以统计10000分的分布情况
%pylab inlineimport scipy.stats.stats as stfrom scipy.stats import normx_norm = norm.rvs(size=500)h = hist(x_norm)print 'counts, ', h[0]print 'bin centers', h[1]
这是一个很简单的例子,还有另一个例子。
0 0
- hist的使用
- hist的使用
- python hist的使用
- matlab hist函数的使用
- MATLAB实现频数直方图——hist的使用
- MATLAB实现频数表——hist的使用
- MATLAB实现频数直方图——hist的使用
- Hist
- hist 和imhist的区别
- matlab hist函数的用法
- 使用Hist函数实现图像直方图
- matlab中的hist函数的应用
- 关于matlab的hist函数取之后的折线
- matlab中hist和histc函数的用法
- Matlab中hist、 histc、bar函数的用法及区别:
- 学习:hist
- hist函数
- hist()直方图
- 【SDOI2009】HH的项链(树状数组)
- 华硕 X99 E WS 安装 macOS Sierra 10.12.4
- 线索二叉树
- 插值算法总结
- Mac下的AS快捷键
- hist的使用
- LeedCode 之 Reverse Integer
- 二叉树的递归建立和遍历
- 集合框架-静态导入
- POJ 1743 Musical Theme <后缀数组+二分>
- linux lsof命令详解
- C#中Split用法~
- 你不知道XML编程的那些事儿(一)
- HTML的新特性