Line | |
---|
1 | <?php
|
---|
2 | require_once ('jpgraph/jpgraph.php');
|
---|
3 | require_once ('jpgraph/jpgraph_windrose.php');
|
---|
4 |
|
---|
5 | $data = array(
|
---|
6 | 0 => array(1,1,2.5,4),
|
---|
7 | 1 => array(3,4,1,4),
|
---|
8 | 'wsw' => array(1,5,5,3),
|
---|
9 | 'N' => array(2,7,5,4,2),
|
---|
10 | 15 => array(2,7,12));
|
---|
11 |
|
---|
12 | // First create a new windrose graph with a title
|
---|
13 | $graph = new WindroseGraph(400,400);
|
---|
14 |
|
---|
15 | // Setup title
|
---|
16 | $graph->title->Set('Windrose basic example');
|
---|
17 | $graph->title->SetFont(FF_VERDANA,FS_BOLD,12);
|
---|
18 | $graph->title->SetColor('navy');
|
---|
19 |
|
---|
20 | // Create the windrose plot.
|
---|
21 | $wp = new WindrosePlot($data);
|
---|
22 | $wp->SetRadialGridStyle('solid');
|
---|
23 | $graph->Add($wp);
|
---|
24 |
|
---|
25 | // Send the graph to the browser
|
---|
26 | $graph->Stroke();
|
---|
27 | ?>
|
---|
28 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.