brendano / conplot

Console ascii art plotter - quick-and-dirty data visualization, e.g. for log statistics

This URL has Read+Write access

conplot / README
100644 58 lines (46 sloc) 2.89 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
conplot - console plotter via ascii art
 
Brendan O'Connor - brenocon@gmail.com - http://github.com/brendano/conplot
 
conplot is a script for when you have a file or stream of lots of numbers and
want to look at it fast. Needs many more features, but basics work.
 
Usage: pipe a column of numbers on stdin to conplot.rb. Tries to be smart
about other junk in the file. It is intended to work with shell tools like
perl -pe, awk/sed, wc, du, sort|uniq -c and the like.
 
Example: time.log is a big list of numbers from a (while sleep 1; do du -m db;
done) loop. I want to know how fast the db is growing over time.
 
 
$ wc -l time.log
   77879 time.log
 
$ head -2 time.log
35 db
36 db
 
$ tail -2 time.log
14540 db
14540 db
 
$ cat time.log | conplot
14601
                                                                         oooooooo
                                                                    oooooo
                                                            ooooooooo
                                                 oooooooooooo
11269 oooooooo
                                       oooo
                                     ooo
                                  oooo
                                 oo
                               ooo
7271 ooooo
                        oooo
                     oooo
                  oooo
               oooo
            oooo
3272 oo
           o
           o
          oo
        ooo
      ooo
-726 0 76826
 
 
Features to do, that probably will never get done
 * scatterplots!!! x,y as two columns on stdin. almost already supported.
 * size according to terminal size (e.g. look at stty -a)
 * histograms should be integrated as an option -- or, use github.com/stevej/conhist