<?php
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_windrose.php');
$data = array(
0 => array(1,1,2.5,4),
1 => array(3,4,1,4),
3 => array(2,7,4,4,3),
5 => array(2,7,1,2));
$graph = new WindroseGraph(400,400);
$graph->title->Set('Windrose example 2');
$graph->title->SetFont(FF_VERDANA,FS_BOLD,12);
$graph->title->SetColor('navy');
$wp = new WindrosePlot($data);
$wp->SetType(WINDROSE_TYPE8);
$weights = array_fill(0,8,10);
$wp->SetRangeWeights($weights);
$wp->scale->SetFont(FF_TIMES,FS_NORMAL,11);
$wp->scale->SetFontColor('navy');
$wp->SetSize(200);
$wp->SetZCircleSize(0.2);
$wp->SetFont(FF_ARIAL,FS_NORMAL,12);
$wp->SetFontColor('darkgreen');
$graph->Add($wp);
$graph->Stroke();
?> |