# Why do we plot distributions (histograms, etc) per logarithmic interval (i.e. per “dec”/“dex”)?

I was trying to explain why we plot distributions (for example the Luminosity distribution function attached) per logarithmic interval (another example would be spectral energy distributions per logarithmic frequency interval), when I realized I have absolutely no idea myself.

In this image the AGN luminosity function, $$\phi(L) \equiv \frac{d \Phi}{d \log L},$$ is plotted in units of per-cubic-Mpc, per-log-L. $\Phi$ has perfectly intuitive meaning: the number-density of AGN, but why use the (differential) luminosity function $\phi$ instead?

Edit: to clarify a little, what we're confused about is not the log-log nature of it, but the units. Lets say I have a distribution of L values, I can then compute the histogram over some bins, $n(L)$, then plot $\log n$ vs. $\log L$ --- that's fine. But here, the distribution is not just $\log n$ vs. $\log L$, it's $(\log n / \log L)$ vs. $\log L$.

i.e. I didn't mean to ask, "Why is log-log plotting useful?"

Let's say I'm looking at the histogram of people's height in the World, but then I plot the logarithm of the number of people with a given height divided by the width of their height bin (e.g. 6 in)... why?

• $f(x)\sim x^{\alpha}\Rightarrow$ linear plot on log-log with slope $\alpha$ is one reason. – Kyle Kanos May 23 '17 at 18:38
• @KyleKanos please see edit – DilithiumMatrix May 23 '17 at 20:11

This is something that is fairly obvious if you learned data analysis in the days before computers were easy, because then you would understand that a plotting $y$ versus $x$ on log-log paper is equivalent to plotting $\log y$ against $\log x$ on ordinary linear graph paper.

You are literally saying "I want to plot $\phi$ against $L$" $$\phi = \phi\left(L\right) \,,$$ but "I have to show a huge range" or "I want to expose a power law" (or a change in the power law as above), so I will plot $$\log \left(\frac{\phi(L)}{\phi(L_\odot)}\right)$$ versus $$\log\left(\frac{L}{L_\odot}\right) \;.$$ instead.

Then you just look at the units of what you are plotting.

Now, there is a subtlety that relates to the fact that this is a histogram. In a naive view, histograms just count how many of something are associates with particular ranges of the independent variable, and that has the odd property of making the vertical axis of the graph depend inversely on the size of the binning. To facilitate comparisons between hisotgrams with different binning—even if they both use equal sized bins—you have to divide the vertical axis by the bin size. So that historgrams in my fields often have units of "events per 50 MeV" or similar.

In principle you can neglect that if you don't want to compare to another histogram unless you have bins of different sizes: then even comparing from bin to bin requires that kind of normalization. And log-scales are of little use unless you let the bin size vary.

• Either I'm not understanding, or perhaps I didn't explain the question well: I'm happy with plotting log-log. But the subtlety I don't understand is the units of the ordinate being not just $\log \phi$, but $\log \phi$ per logarithmic interval. I've tried to edit the question to clarify a bit. – DilithiumMatrix May 23 '17 at 19:38
• @DilithiumMatrix Ah. So this is really about why histograms are scaled by bin-size in the first place. I've explained that context as well. – dmckee --- ex-moderator kitten May 23 '17 at 20:11

I don't know in this specific case, but in most instances where we plot something in logarithmic space, it is because the data spans many orders of magnitude and there are important features to be identified at both large and small scales.

If you were to plot your luminosity in linear space, it would basically just go from 1e-3 to 0 almost instantly and then just appear to stay there. You would miss the fact there it looks like there are two regions that are linear (in log space) with a blending function in between. You would also miss the differences between the lines -- in linear space, they would all collapse together and look like a blob of a line headed to zero.

In almost all instances, log spacing is used because the data spans a huge number of values and this helps highlight the differences that would ordinarily be hidden at large and small scales.

• In signal processing/analysis log-space is extremely important for that reason. You want to see how something behaves over many frequency ranges (for example the difference between interaction at the Hz range and GHz range). – JMac May 23 '17 at 18:43