Exemple #1
0
 ,array(2010,47,'u32q',0.12)
 ,array(2010,48,'u32q',0.14)
 ,array(2011,49,'u32q',0.14)
 ,array(2011,50,'u32q',0.24)
 ,array(2011,51,'u32q',0.26)
 ,array(2011,52,'u32q',0.67)
 ,array(2011,53,'u32q',1.00)
       ) );
       


// CHART /////////////////////////////////////////////////////

$chart = new StepChart();

$chart->yscale = 1.7;
$chart->yAxis(axisPercent(axis10()));
$chart->xAxis(axisYrMth(),6.0);

$chart->steps(GP4,$d[0]);
$chart->steps(DEBIAN,$d[1]);
$chart->steps(U32Q,$d[2]);

$chart->title('Cumulative Percentage of Measurements by Month');
$chart->xAxisLegend('month');
$chart->yAxisLegend('cumulative percentage');
$chart->frame();
$chart->complete();

?>
SetChartCacheControl();
$in = WhiteListIn();
$WhiteListLangs = WhiteListUnique('lang.csv', $in);
// DATA LAYOUT ///////////////////////////////////////////////////
define('STATS_SIZE', 8);
define('STAT_MIN', 0);
define('STAT_XLOWER', 1);
define('STAT_LOWER', 2);
define('STAT_MEDIAN', 3);
define('STAT_UPPER', 4);
define('STAT_XUPPER', 5);
define('STAT_MAX', 6);
define('STATS_N', 7);
// DATA ////////////////////////////////////////////////////
list($Mark, $valid) = ValidMark(TRUE);
list($BackText, $valid) = ValidLangs($WhiteListLangs, $valid);
list($Stats, $valid) = ValidMatrix('s', STATS_SIZE, $valid);
//for ($i=0;$i<sizeof($Stats);$i++) $Stats[$i] = log10($Stats[$i]);
// CHART /////////////////////////////////////////////////////
$chart = new BoxChart();
$chart->yAxis(axis10());
if ($valid) {
    $chart->backgroundText($BackText);
    $chart->boxAndWhiskers($Stats);
    $chart->notice($Mark);
}
$chart->xAxisLegend('selected language implementations');
$chart->yAxisLegend('program time ÷ fastest program time');
$chart->title('Ten tiny examples - How many times slower?');
$chart->frame();
$chart->complete();