<?php
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_bar.php');
$datay=array(10,29,3,6);
$graph = new Graph(200,200);
$graph->SetScale('textlin');
$graph->SetMargin(25,10,20,25);
$graph->SetBox(true);
$graph->yscale->SetGrace(10);
$graph->ygrid->Show(false);
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");
$graph->Add($bplot);
$band = new PlotBand(HORIZONTAL,BAND_3DPLANE,15,35,'khaki4');
$band->SetDensity(80);
$band->ShowFrame(true);
$graph->AddBand($band);
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_3DPLANE, Density=80');
$graph->Stroke();
?> |