About 1,010,000 results
Open links in new tab
  1. python - How does numpy.histogram () work? - Stack Overflow

    Feb 4, 2012 · A bin is range that represents the width of a single bar of the histogram along the X-axis. You could also call this the interval. (Wikipedia defines them more formally as "disjoint categories".) …

  2. python - Histogram Matplotlib - Stack Overflow

    Mar 16, 2011 · Numpy's histogram function returns the edges of each bin, rather than the value of the bin. This makes sense for floating-point numbers, which can lie within an interval, but may not be the …

  3. Getting information for bins from the histogram function

    Sep 21, 2023 · I am plotting a histogram in python using matplotlib by: plt.hist(nparray, bins=10, label='hist') Is it possible to print a dataframe that has the information for all the bins, like number of …

  4. Matplotlib histogram from numpy histogram output - Stack Overflow

    May 16, 2017 · The numpy version just returns the nbin+1 bin edges and nbin frequencies, whereas the matplotlib version goes on to make the plot itself. So is there an easy way to generate the histograms …

  5. numpy - How to calculate the standard deviation from a histogram ...

    Let's say I have a data set and used matplotlib to draw a histogram of said data set. n, bins, patches = plt.hist(data, normed=1) How do I calculate the standard deviation, using the n and bins ...

  6. binning data in python with scipy/numpy - Stack Overflow

    2 Another alternative is to use the ufunc.at. This method applies in-place a desired operation at specified indices. We can get the bin position for each datapoint using the searchsorted method. Then we can …

  7. How to choose bins in matplotlib histogram - Stack Overflow

    Nov 1, 2015 · 11 To complemented jakes answer, you can use numpy.histogram_bin_edges if you just want to calculate the optimal bin edges, without actually doing the histogram. histogram_bin_edges …

  8. python - Numpy histogram of large arrays - Stack Overflow

    Aug 4, 2015 · import numpy as np datamin = -5 datamax = 5 numbins = 20 mybins = np.linspace(datamin, datamax, numbins) myhist = np.zeros(numbins-1, dtype='int32') for i in …

  9. numpy - How to have logarithmic bins in a Python histogram - Stack …

    Jul 28, 2011 · How to have logarithmic bins in a Python histogram Asked 14 years, 4 months ago Modified 1 year, 8 months ago Viewed 126k times

  10. plotting a histogram on a Log scale with Matplotlib

    Dec 17, 2017 · 6 Seaborn is also a good solution for histograms with a log scale, without having to manually specify the histogram bin edges, as you would with just matplotlib.