lib/statsample/graph/histogram.rb in statsample-1.4.3 vs lib/statsample/graph/histogram.rb in statsample-1.5.0

- old
+ new

@@ -4,13 +4,13 @@ # In statistics, a histogram is a graphical representation, showing a visual impression of the distribution of experimental data. It is an estimate of the probability distribution of a continuous variable and was first introduced by Karl Pearson [1]. A histogram consists of tabular frequencies, shown as adjacent rectangles, erected over discrete intervals (bins), with an area equal to the frequency of the observations in the interval. The height of a rectangle is also equal to the frequency density of the interval, i.e., the frequency divided by the width of the interval. The total area of the histogram is equal to the number of data. # # == Usage # === Svg output - # a=[1,2,3,4].to_scale + # a=[1,2,3,4].to_numeric # puts Statsample::Graph::Histogram.new(a).to_svg # === Using ReportBuilder - # a=[1,2,3,4].to_scale + # a=[1,2,3,4].to_numeric # rb=ReportBuilder.new # rb.add(Statsample::Graph::Histogram.new(a)) # rb.save_html('histogram.html') class Histogram