/quickhist

quickly plot a histogram on the CLI

Primary LanguagePythonMIT LicenseMIT

quickhist

NOTE: requires numpy

Plots the distribution of the input data, and provides some basic stats.

Try:

for x in $( seq 1 100000 ); do echo $(( ($RANDOM + $RANDOM + $RANDOM) )) ; done  |  quickhist

       │                         ╻╻┃┃┃╻┃╻╻╻                         
       │                       ╻┃┃┃┃┃┃┃┃┃┃┃╻╻                       
       │                     ╻┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃╻                     
       │                   ╻┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃                    
 prop. │                 ╻┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃╻                  
       │               ╻┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃╻                
       │              ╻┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃╻              
       │           ╻┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃╻╻           
       │        ╻╻┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃╻╻        
       │   ╻╻╻┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃╻╻    
       └──────────────────────────────────────────────────────────────
       1601.0                                                         97480.0

count      : 100000
25th perc. : 37635.75
50th perc. : 49159.0
75th perc. : 60738.0
for x in $( seq 1 100000 ); do echo $RANDOM ; done  |  quickhist
       │                  ┃                                         
       │   ┃ ╻╻╻ ┃ ╻╻┃ ╻ ┃┃ ╻╻╻╻┃  ╻┃ ┃ ┃╻╻╻ ╻╻  ╻╻      ╻  ┃  ╻╻┃╻ 
       │┃┃┃┃ ┃┃┃ ┃┃┃┃┃┃┃┃┃┃╻┃┃┃┃┃╻┃┃┃┃┃╻┃┃┃┃╻┃┃ ┃┃┃┃ ┃ ╻╻┃┃╻┃╻┃┃┃┃┃ 
       │┃┃┃┃╻┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃
 prop. │┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃
       │┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃
       │┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃
       │┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃
       │┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃
       │┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃
       └──────────────────────────────────────────────────────────────
       5.0                                                         32765.0

count      : 10000
25th perc. : 8156.5
50th perc. : 16158.5
75th perc. : 24324.0