<?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 4');
$graph->title->SetFont(FF_VERDANA,FS_BOLD,12);
$graph->title->SetColor('navy');
 
$wp = new WindrosePlot($data);
 
$wp->scale->SetFont(FF_TIMES,FS_NORMAL,11);
$wp->scale->SetFontColor('navy');
 
$wp->SetSize(190);
 
$wp->SetZCircleSize(0.38);
$wp->scale->SetZeroLabel("Station 12\n(Calm %d%%)");
 
$wp->scale->SetZFont(FF_ARIAL,FS_NORMAL,9);
$wp->scale->SetZFontColor('darkgreen');
 
$wp->SetFont(FF_ARIAL,FS_NORMAL,10);
$wp->SetFontColor('darkgreen');
 
$wp->SetLabelMargin(50);
 
$wp->SetGridColor('silver','blue');
 
$wp->legend->SetText('(m/s)');
$wp->legend->SetMargin(20,5);
 
$graph->Add($wp);
$graph->Stroke();
?> |