<?php
include ("jpgraph/jpgraph.php");
include ("jpgraph/jpgraph_bar.php");
$graph = new Graph(250, 200, "auto");
$graph->SetFrame(true);
$graph->SetScale("textlin");
$graph->img->SetMargin(30, 30, 30, 30);
$ydata1 = array(10, 4, 7, 9, 2, 3);
$ydata2 = array(5, 12, 3, 8, 5, 9);
$barplot1 = new BarPlot($ydata1);
$barplot1->SetFillColor("orange");
$barplot2 = new BarPlot($ydata2);
$barplot2->SetFillColor("blue");
$accbarplot = new AccBarPlot(array($barplot1, $barplot2));
$graph->Add($accbarplot);
$graph->Stroke();
?>