Skip to content

lebinh/goplot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goplot - terminal based stream plotting

Sample plots

Install:

$ go get github.com/lebinh/goplot

Samples:

$ goplot bar test_bar.txt
  one: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  1987
  two: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  1410.1
three: ▇▇▇▇▇▇▇  266
 four: ▏  10
 five: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  918
  six: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  1991
seven: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  2017

$ goplot hist -bin 5 -left 0 -right 50 test_hist.txt
0.00 -> 10.00: ▇▇▇▇▇▇▇▇▇▇  1
        20.00: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  3
        30.00: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  6
        40.00: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  3
        50.00: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  2

$ du -s /Applications/* | sort -n | tail -n 5 |  awk '{print $2,$1}' | goplot bar
/Applications/HipChat.app: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  420616
  /Applications/Pages.app: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  461432
    /Applications/Gogland: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  839608
/Applications/Keynote.app: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  950544
/Applications/PyCharm.app: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  1.216752e+06

$ du -s /Applications/* | awk '{print $1}' | goplot hist
832.00 -> 122424.00: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇  43
          244016.00: ▇▇▇▇▇  4
          365608.00: ▇▇▇▇▇▇▇▇▇  7
          487200.00: ▇▇▇▇▇  4
          608792.00: ▏  0
          730384.00: ▏  0
          851976.00: ▇  1
          973568.00: ▇  1
         1095160.00: ▏  0
         1216752.00: ▇  1

Releases

No releases published

Packages

No packages published

Languages