1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| <?php
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_windrose.php');
$data = array(
'10' => array(1,1,2.5,4),
'32.0' => array(3,4,1,4),
'120.5' => array(2,3,4,4,3,2,1),
'223.2' => array(2,4,1,2,2),
'285.7' => array(2,2,1,2,4,2,1,1)
);
$labels = array( '120.5' => "Plant\n#1275",
'285.7' => "Reference\n#13 Ver:2");
$rangeColors = array('khaki','yellow','orange','orange:0.7','brown','darkred','black');
$graph = new WindroseGraph(400,450);
$graph->title->Set('Windrose example 6');
$graph->title->SetFont(FF_VERDANA,FS_BOLD,12);
$graph->title->SetColor('navy');
$graph->subtitle->Set('(Free type plot)');
$graph->subtitle->SetFont(FF_VERDANA,FS_ITALIC,10);
$graph->subtitle->SetColor('navy');
$wp = new WindrosePlot($data);
$wp->SetType(WINDROSE_TYPEFREE);
$wp->SetLabels($labels);
$wp->SetLabelPosition(LBLPOSITION_CENTER);
$wp->SetLabelMargin(30);
$wp->SetRangeColors($rangeColors);
$wp->scale->SetFont(FF_ARIAL,FS_NORMAL,9);
$wp->SetSize(230);
$wp->SetZCircleSize(30);
$wp->SetFont(FF_ARIAL,FS_NORMAL,10);
$wp->SetFontColor('darkgreen');
$wp->SetGridColor('darkgreen@0.7','blue');
$wp->legend->SetText('(m/s)');
$wp->legend->SetFormat('%d');
$graph->Add($wp);
$graph->Stroke();
?> |