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)
| 280 | |
| 281 | |
| 282 | def ratio_response(x): |
| 283 | """How we display actual size ratios |
| 284 | |
| 285 | Common ratios in sizes span several orders of magnitude, |
| 286 | which is hard for us to perceive. |
| 287 | |
| 288 | We keep ratios in the 1-3 range accurate, and then apply a logarithm to |
| 289 | values up until about 100 or so, at which point we stop scaling. |
| 290 | """ |
| 291 | if x < math.e: |
| 292 | return x |
| 293 | elif x <= 100: |
| 294 | return math.log(x + 12.4) # f(e) == e |
| 295 | else: |
| 296 | return math.log(100 + 12.4) |