bennacer860/benford_s_law — pull request #1 by alexQueue (2013-06-19 18:17:24+00:00)
Title: Log charts

Since Benford's law is exponential, the data looks a lot clearer as a log chart. Added the option to pass "log" as a parameter to display the data as a log chart. A log display with a fairly straight line means the data fits relatively well with Benford's prediction.

```
$ ruby benford.rb log
{"1"=>56.86, "2"=>20.68, "3"=>8.15, "4"=>5.37, "5"=>2.98, "6"=>2.19, "7"=>0.99, "8"=>1.19, "9"=>1.59}
1: ----------------------------------------------------------|result:5.83 (56.86%).-error:88.9%
2: --------------------------------------------|result:4.37 (20.68%).-error:17.43%
3: ------------------------------|result:3.03 (8.15%).-error:34.75%
4: ------------------------|result:2.42 (5.37%).-error:44.58%
5: ----------------|result:1.58 (2.98%).-error:62.37%
6: -----------|result:1.13 (2.19%).-error:67.26%
7: |result:-0.01 (0.99%).-error:82.93%
8: ---|result:0.25 (1.19%).-error:76.76%
9: -------|result:0.67 (1.59%).-error:65.28%
30.000000 10.000000 40.000000 ( 33.972979)
```