4 ms·
To the people who use log-scales for visualization of discrete events (e.g. 0, 1, 2, 3, 4, ...): How do you deal with a value of 0? Do you use the same distan
by yoodenvranx 9y ago
To the people who use log-scales for visualization of discrete events (e.g. 0, 1, 2, 3, 4, ...):
How do you deal with a value of 0?
Do you use the same distance between "0" and 1 as between 1 and 10?
On a different note:
In a lot of cases I prefer using something like sqrt(data) or data^(0.x) because a) it smoothly supports the case of 0 and b) it squashes the data less than log.
Regarding b): In a lot of cases I think that log() squashes the information too much and you easily lose a sense of scale. A scaling funtion like sqrt(data) still squashes data with high values but it maintains the feeling of "Oh, this value is much higher than that value" better than log(data).
- aidenn0 9y agoThe intercept of a log-scaled axis should always be positive, and a value of 0 would not appear on the chart. Many times it's non-sensical for a value of 0 (e.g. pressure, frequency), but wikipedia[1] has an example of tracking pandemic cases (which tends to be logistic, so includes an exponential growth phase) and you see that values below 0 do not appear at all on the graph. In this case, the slope of each dataset is the important thing, and very low values are probably too noisy to give you information anyways 1: https://en.wikipedia.org/wiki/File:Influenza-2009-cases-logarithmic.png https://en.wikipedia.org/wiki/File:Influenza-2009-cases-loga...
- stenl 9y agoThe typical approach is to plot log(x+1) instead, which deals with the zeros as long as you know what you’re looking at. It’s nice to add some jitter too, e.g. a uniform random float number in the -0.25 to 0.25 range.