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
| <?php
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_windrose.php');
$data = array(
2 => array(1,15,7.5,2),
5 => array(1,1,1.5,2),
7 => array(1,2,10,3,2),
8 => array(2,3,1,3,1,2),
);
$graph = new WindroseGraph(590,580);
$graph->title->Set('Japanese locale');
$graph->title->SetColor('navy');
$wp = new WindrosePlot($data);
$wp->SetType(WINDROSE_TYPE8);
$wp->scale->SetZeroLabel("SOx\n8%%");
Note:
$jp_CompassLbl = array('東','','北東','','北','','北西','',
'西','','南西','','南','','南東','');
$wp->SetCompassLabels($jp_CompassLbl);
$jp_calmtext = '平穏';
$wp->legend->SetCircleText($jp_calmtext);
$wp->legend->SetCircleRadius(20);
$wp->legend->SetMargin(5,0);
$wp->SetPos(0.5, 0.5);
$ranges = array(1,3,5,8,12,19,29);
$wp->SetRanges($ranges);
$wp->scale->Set(30,10);
$graph->Add($wp);
$graph->Stroke();
?> |