source: trunk/xgraph/jpgraph/Examples/windrose_ex0.php

Last change on this file was 42, checked in by marrucho, 10 years ago
File size: 629 bytes
Line 
1<?php
2require_once ('jpgraph/jpgraph.php');
3require_once ('jpgraph/jpgraph_windrose.php');
4
5// Data can be specified using both ordinal index of the axis
6// as well as the direction label
7$data = array(
8    0 => array(5,5,5,8),
9    1 => array(3,4,1,4),
10    'WSW' => array(1,5,5,3),
11    'N' => array(2,3,8,1,1),
12    15 => array(2,3,5));
13
14// First create a new windrose graph with a title
15$graph = new WindroseGraph(400,400);
16$graph->title->Set('A basic Windrose graph');
17
18// Create the windrose plot.
19$wp = new WindrosePlot($data);
20
21// Add and send back to browser
22$graph->Add($wp);
23$graph->Stroke();
24?>
25
Note: See TracBrowser for help on using the repository browser.