plt.hist()和numpy.histogram()的学习

matplotlib.pyplot.hist( )


matplotlib.pyplot.hist(x, bins=None, range=None, density=None, weights=None, cumulative=False, bottom=None, histtype=’bar’, align=’mid’, orientation=’vertical’, rwidth=None, log=False, color=None, label=None,
stacked=False, normed=None, hold=None, data=None, **kwargs)

  • Compute and draw the histogram of x. The return value is a tuple (n, bins, patches) or ([n0, n1, …],
  • bins,[integer or sequence or ’auto’, optional] If an integer is given, bins + 1 bin edges are calculated and returned, consistent with numpy.histogram().
    If bins is a sequence, gives bin edges, including left edge of first bin and right
    edge of last bin. In this case, bins is returned unmodified.
    All but the last (righthand-most) bin is half-open. In other words, if bins is:
    [1, 2, 3, 4] then the first bin is [1, 2) (including 1, but excluding 2) and the second [2, 3).
    The last bin, however, is [3, 4], which includes 4.
    Unequally spaced bins are supported if bins is a sequence.
    If Numpy 1.11 is installed, may also be ’auto’.
    Default is taken from the rcParam hist.bins
  • range [tuple or N
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值