How to choose bins in matplotlib histogram

后端 未结 4 1728
遥遥无期
遥遥无期 2020-12-22 20:30

Can someone explain to me what \"bins\" in histogram are (the matplotlib hist function)? And assuming I need to plot the probability density function of some data, how do th

4条回答
  •  我在风中等你
    2020-12-22 20:46

    Bins are the number of intervals you want to divide all of your data into, such that it can be displayed as bars on a histogram. A simple method to work our how many bins are suitable is to take the square root of the total number of values in your distribution.

提交回复
热议问题