examples/histogram.rb in statsample-0.17.0 vs examples/histogram.rb in statsample-0.18.0

- old
+ new

@@ -1,14 +1,13 @@ #!/usr/bin/ruby $:.unshift(File.dirname(__FILE__)+'/../lib/') $:.unshift('/home/cdx/dev/reportbuilder/lib/') - -require 'benchmark' require 'statsample' -n=1000 -a=n.times.map {|i| rand()*20}.to_scale -hg=Statsample::Graph::Histogram.new(a, :bins=>15) +n=3000 +rng=Distribution::Normal.rng_ugaussian +a=n.times.map {|i| rng.call()*20}.to_scale +hg=Statsample::Graph::Histogram.new(a, :bins=>20, :line_normal_distribution=>true ) rb=ReportBuilder.new -rb.add(a.histogram) +#rb.add(a.histogram) rb.add(hg) -puts rb.to_text +rb.save_html('histogram.html')