What do we mean by log-scaling a plot?

330 Views Asked by At

So imagine we have the following plot, which is a histogram (but it works also for plotting functions, the question is the same!) of random samples from a normal distribution.

hist

Often I hear about log-scaling it. Using the computer (Python), I can set the scale to log and I get the following:

hist2

now of course if we take the logarithm of the normal distribution, we end up with a parabola. So looking at the second image, it does look like a parabola with negative coeffiecient (as it should be!) so my first idea was

log-scaling means that we take each value $y(x)$ (or in general the whole function $y=y(x)$), we take its logarithm and we plot it against the same $x$'s.

However using Python, I tried this manually and it turns out it doesn't work. Then my second idea was:

log-scaling means taking the log of both the input ($x$) and the output $(y(x)$ and plot $y(x)$ agains $x$.

Again, simply by trying we see it doesn't work.

Then asking on stackoverflow, I was told that

what (supposedly) what the logscaling does, is to scale the axes, but NOT THE INPUT AND THE OUTPUT.

but then again what does that even mean?

To give a context: imagine I have a normal distribution, if I plot it I get a curve similar to the profile of picture one. If I take the logarithm of it, I should get a shifted negative parabola and then if I take the square root of it (restricting the values of $x$ so that $y(x)$ are all above the $x$ axis), I should get a straight line. Right?

So that is what I would like to do with my data. But if I try it comes out wrong, which means that log-scaling actually means something else. So then what does it mean?