conplot – a console plotter

This has to be the most quick-and-dirty data visualizer out there: I wrote an ascii art plotter script that takes a column of numbers on stdin and throws out a plot on your console. I’ve been using it for several months to quickly look at numbers on the commandline, especially from logs and such. (Back in school I would use gnuplot for this; R is good too. But sometimes you want to move really fast, esp if you have a few hideous perl -pe one-liners on your hands and mucking around with temp files will interrupt your flow.)

Link: github.com/brendano/conplot

“Demo”:

$ 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

I must say, it’s way easier to throw up some code on GitHub than on to SourceForge, which is the only other open source code hosting service I’ve used. I guess Google Code is their biggest competitor in that respect; I haven’t tried it.

This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to conplot – a console plotter

  1. Pingback: Infovore » links for October 12th

  2. Pingback: Too busy to leave the console · DragonFly BSD Digest

  3. Hi dude,

    Is it possible to stop this program from throwing a paddy if every number in the list is the same? I have it plotting percentages at the moment and if every value in the list is 100% then the program throws the following back:

    ./conplot:46:in `to_i’: NaN (FloatDomainError)
    from ./conplot:46:in `print_console’
    from ./conplot:43:in `each’
    from ./conplot:43:in `print_console’
    from ./conplot:132