How we display actual size ratios Common ratios in sizes span several orders of magnitude, which is hard for us to perceive. We keep ratios in the 1-3 range accurate, and then apply a logarithm to values up until about 100 or so, at which point we stop scaling.
(x)
| 271 | |
| 272 | |
| 273 | def ratio_response(x): |
| 274 | """How we display actual size ratios |
| 275 | |
| 276 | Common ratios in sizes span several orders of magnitude, |
| 277 | which is hard for us to perceive. |
| 278 | |
| 279 | We keep ratios in the 1-3 range accurate, and then apply a logarithm to |
| 280 | values up until about 100 or so, at which point we stop scaling. |
| 281 | """ |
| 282 | if x < math.e: |
| 283 | return x |
| 284 | elif x <= 100: |
| 285 | return math.log(x + 12.4) # f(e) == e |
| 286 | else: |
| 287 | return math.log(100 + 12.4) |