<?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(array(255, 0, 0));
$lineplot2 = new LinePlot($ydata2);
$lineplot2->SetColor(array(0, 0, 255));

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

$graph->Add($acclineplot);

$graph->Stroke();
?>