Histograms with logarithmic x scale (LogHist and LogHistBins)
Tue, 03/02/2021 - 07:28 am
currently I am using Igor Pro 7.08 and the procedure Log Histogram.ipf version 3.0. When using the two functions LogHist and LogHistBins I realized that they are not doing there work as they should do. Since programming this function should not be too difficult, I am wondering whether I am missing something, therefore let us consider the following simple case:
I have a distribution of some values [1,5,6,8,15,56,169] and want to create a histogram with a logarithmic x scale and a "logarithmically varying" bin size. Bin size shall be same as decades to keep it simple, i.e. 1-10^1, 10^1-10^2, 10^2-10^3, ...
Now just by looking you see that the histogram y values should be the following: [4, 2, 1, 0, 0, ...].
LogHistBin(test_values, 1, 1000, 3) gives me [1, 4, 2] (LogHistBins(wave, startValue, endValue, binNumbers))
LogHist(test_values, 3, 1, 1) gives me [1, 2, 0, 0] (LogHist(wave, decadesNumber, startValue, binsPerDecade))
First of all, none of the above functions provide me with the outcome I expected. Secondly, although those two are different functions, they should provide the same results when same conditions are provided, but they don´t. I am quite confused and could not find an answer to this. Am I missing something here?