diff options
author | Sergey Grebenshchikov <sgreben@gmail.com> | 2018-03-30 01:10:30 +0200 |
---|---|---|
committer | Sergey Grebenshchikov <sgreben@gmail.com> | 2018-03-30 01:10:30 +0200 |
commit | c7e51836101e57e837c1f8834978942158a78219 (patch) | |
tree | 0bd72ab09ac204a49fbe52be7156b545940bc40c | |
parent | 53ecae98e8c785f88e0debd508a712441276da3e (diff) |
Update README.md
-rw-r--r-- | README.md | 67 |
1 files changed, 66 insertions, 1 deletions
@@ -19,6 +19,9 @@ Dead simple terminal plots from JSON (or CSV) data. Bar charts, line charts, and - [Array data, XY pairs](#array-data-xy-pairs) - [Y values only (X=index)](#y-values-only-xindex-1) - [Scatter plot](#scatter-plot) + - [Histogram](#histogram) + - [Auto bin number](#auto-bin-number) + - [Fixed bin number](#fixed-bin-number) - [CSV input](#csv-input) - [Screenshots](#screenshots) @@ -53,7 +56,7 @@ unzip jp_1.1.3_windows_x86_64.zip ```text Usage of jp: -type value - Plot type. One of [line bar scatter] (default line) + Plot type. One of [line bar scatter hist] (default line) -x string x values (JSONPath expression) -y string @@ -276,6 +279,68 @@ $ cat examples/mvrnorm.json | jp -xy '..[x,y]' -type scatter -4.08815 3.79083 ``` +### Histogram + +#### Auto bin number + +``` +$ cat examples/mvrnorm.json | jp -x ..x -type hist + 684 1 [0.571769,1.14354) + ██████ 2 [1.14354,1.71531) + ██████ 624 3 [1.71531,2.28708) + ████████████ 4 [2.28708,2.85885) + 557 ████████████ 5 [2.85885,3.43062) + ██████████████████ 6 [3.43062,4.00238) + ██████████████████ 7 [4.00238,4.57415) + ██████████████████ 8 [4.57415,5.14592) + ██████████████████ 9 [5.14592,5.71769) + ██████████████████ 404 10 [5.71769,6.28946) + ████████████████████████ 11 [6.28946,6.86123) + 314 ████████████████████████ 12 [6.86123,7.433] + ▄▄▄▄▄▄████████████████████████ + ██████████████████████████████ + ██████████████████████████████ + ██████████████████████████████ + ██████████████████████████████ 176 + ████████████████████████████████████ + 98 ████████████████████████████████████ + ██████████████████████████████████████████ 79 + 1 4 41 ████████████████████████████████████████████████ 14 4 + ▁▁▁▁▁▁▁▁▁▁▁▁██████████████████████████████████████████████████████▁▁▁▁▁▁▁▁▁▁▁▁ + + 0 1 2 3 4 5 6 7 8 9 10 11 12 +``` + +#### Fixed bin number + +``` +$ cat examples/mvrnorm.json | jp -x ..x -type hist -bins 5 + 1652 + █████████████████ + █████████████████ + █████████████████ + █████████████████ + █████████████████ + █████████████████ + █████████████████ + █████████████████ + █████████████████ + █████████████████ + █████████████████ + █████████████████ 728 + ██████████████████████████████████ + 541 ██████████████████████████████████ + ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██████████████████████████████████ + ███████████████████████████████████████████████████ + ███████████████████████████████████████████████████ + ███████████████████████████████████████████████████ + ███████████████████████████████████████████████████ + 22 ███████████████████████████████████████████████████ 57 + ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███████████████████████████████████████████████████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ + + [0,1.4866) [1.4866,2.9732) [2.9732,4.4598) [4.4598,5.9464) [5.9464,7.433] +``` + ### CSV input ``` |