in reply to How do I make a histogram Question?
will do what you like, whereupon the histogram can be printed using gsl_histogram_fprintf or gsl_histogram_fscanf. (I don't understand why gsl_histogram_set_ranges needs that final argument, since it can be figured automatically once $h is known; but the documentation says it does, and I am not in a position to test.)my $h = gsl_histogram_alloc 3; gsl_histogram_set_ranges $h, [0, 41, 61, 100], 4; gsl_histogram_increment $h, $_ for @values;
(Boy, gotta love those flat namespaces. I'll bet it's fun to call these functions as Math::GSL::Histogram::gsl_histogram_xxx.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I make a histogram Question?
by Niner710 (Sexton) on Jan 28, 2009 at 02:22 UTC | |
by JadeNB (Chaplain) on Jan 28, 2009 at 02:36 UTC | |
by Niner710 (Sexton) on Jan 28, 2009 at 04:02 UTC | |
by syphilis (Archbishop) on Jan 28, 2009 at 07:51 UTC | |
by Niner710 (Sexton) on Jan 30, 2009 at 00:45 UTC |