<?php

include ("jpgraph/jpgraph.php");
include ("jpgraph/jpgraph_line.php");

$graph = new Graph(300, 200, "auto"); 
$graph->SetFrame(true);
$graph->SetScale("textlin");

$graph->img->SetMargin(40, 40, 30, 30);

$ydata1 = array(10, 4, 7, 9, 2, 3);
$ydata2 = array(3, 6, 10, 4, 4, 8);

$lineplot1 = new LinePlot($ydata1);
$lineplot1->SetColor("black");
$lineplot1->SetFillColor("orange");
$lineplot2 = new LinePlot($ydata2);
$lineplot2->SetColor("black");
$lineplot2->SetFillColor("yellow");

$acclineplot = new AccLinePlot(array($lineplot1, $lineplot2));

$graph->Add($acclineplot);

$graph->Stroke();
?>