geomBox

Draw a boxplot. The "x" data is used. If labels are given then the data is grouped by the label

geomBox
(
AES
)
(
AES aes
)

Examples

import std.array : array;
import std.algorithm : map;
import std.range : repeat, iota, chain;
import std.random : uniform;
auto xs = iota(0,50,1).map!((x) => uniform(0.0,5)+uniform(0.0,5)).array;
auto cols = "a".repeat(25).chain("b".repeat(25)).array;
auto aes = Aes!(typeof(xs), "x", typeof(cols), "colour", 
    double[], "fill", typeof(cols), "label" )( 
        xs, cols, 0.45.repeat(xs.length).array, cols);
auto gb = geomBox( aes );
assertEqual( gb.front.bounds.min_x, -0.5 );

Meta