/usr/share/doc/ruby-gsl/examples/narray/histogram.rb is in ruby-gsl 2.1.0.3+dfsg1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/usr/bin/env ruby
require("gsl")
N = 10000
r = GSL::Rng.alloc
na = r.gaussian(1.0, N).to_na # Generate N random numbers
p na.class
p na.rank
p na.size
p na.min
p na.max
h = GSL::Histogram.alloc(50, [-4, 4])
h.fill(na)
h.graph("-T X -C -g 3")
|