<?php
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_line.php');
$ydata = array(17,3,'-',10,7,'-',3,19,9,7);
$width=350;
$height=250;
$graph = new Graph($width,$height);
$graph->SetScale('intlin');
$graph->SetShadow();
$graph->SetMargin(40,20,20,40);
$graph->title->Set('Interpolated values');
$graph->xaxis->title->Set('x-title');
$graph->yaxis->title->Set('y-title');
$graph->yaxis->title->SetFont( FF_ARIAL , FS_BOLD, 9 );
$graph->xaxis->title->SetFont( FF_ARIAL , FS_BOLD, 9 );
$graph->yaxis->SetColor('blue');
$lineplot=new LinePlot($ydata);
$lineplot->SetColor( 'blue' );
$lineplot->SetWeight( 2 );
$graph->Add($lineplot);
$graph->Stroke();
?> |