Sha256: 78193eccba151eafec6010d056827bf551114a1363628c7476bf9cd992950f1f
Contents?: true
Size: 813 Bytes
Versions: 6
Compression:
Stored size: 813 Bytes
Contents
#!/usr/bin/ruby $:.unshift(File.dirname(__FILE__)+'/../lib/') # == Description # # This example demonstrates how a histogram can be created # with statsample. # # The 'histogram' function creates a histogram by using the # Statsample::Graph::Histogram class. This class accepts data # in a Daru::Vector (as created by `rnorm`). # # A line showing normal distribution can be drawn by setting # the `:line_normal_distribution` option to *true*. # # See this notebook for an illustration: # http://nbviewer.ipython.org/github/SciRuby/sciruby-notebooks/blob/master/statistics/Creating%20a%20Histogram.ipynb require 'statsample' Statsample::Analysis.store(Statsample::Graph::Histogram) do histogram(rnorm(3000,0,20), :line_normal_distribution => true) end if __FILE__==$0 Statsample::Analysis.run end
Version data entries
6 entries across 6 versions & 2 rubygems