### ----------------------------------------------------
### -- Text::Plot
### -- Licenses: Artistic-2.0
### -- Authors: Anton Antonov
### -- File: t/04-histogram.rakutest
### ----------------------------------------------------
use v6.d;

use lib <. lib>;
use Text::Plot;

use Test;
plan *;

my ($μ, $σ) = (5, 2);
my @data = (^500).map({ $μ + $σ * (2 * pi * (1 - rand)).cos * (- 2 * log rand).sqrt });

ok text-histogram(@data, 30, type => 'count', :filled, point-char => <* *>);

ok text-histogram(@data, 30, type => 'probabilities', :!filled);

ok text-histogram(@data, 30, type => 'pdf', width => 100);

ok text-histogram(@data, 40, type => 'cdf', width => 100);

done-testing;


