Prints a histogram to the console based on a stream of numbers. (based in part on conplot)
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
histogram.rb

README

Given a stream of numbers to stdin, print out a histogram 
(a numerical and graphic version) of the data.

You can use it programmatically, too:

irb(main):1:0> plot = ConHist::Print.new [1,1,1,1,1,2,3,4,5,6,7,8,9]
irb(main):2:0> plot.print_console
Number of Bins: 9
Absolute distribution
1 => 5
2 => 1
3 => 1
4 => 1
5 => 1
6 => 1
7 => 1
8 => 1
9 => 1
Graphical Distribution
1| xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2| xxxxx
3| xxxxx
4| xxxxx
5| xxxxx
6| xxxxx
7| xxxxx
8| xxxxx
9| xxxxx
=> [1, 2, 3, 4, 5, 7, 8, 9]

Available under the Apache License 2.0

If you have feedback, please send it to me at stevej@pobox.com