source: trunk/xgraph/jpgraph/Examples/radarex9.php @ 42

Last change on this file since 42 was 42, checked in by marrucho, 10 years ago
File size: 971 bytes
Line 
1<?php // content="text/plain; charset=utf-8"
2require_once ('jpgraph/jpgraph.php'); 
3require_once ('jpgraph/jpgraph_radar.php');
4
5$titles=array("N", '', "NW", '', "W", '', "SW", '', 'S', '', "SE", '', "E", '', "NE", '');
6$data=array(0, 0, 8, 10, 70, 90, 42, 0, 70, 60, 50, 40, 30, 40, 37.8, 72);
7
8$graph = new RadarGraph (250,270); 
9
10$graph->title->Set("Accumulated PPM");
11$graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);
12
13$graph->subtitle->Set("(according to direction)");
14$graph->subtitle->SetFont(FF_VERDANA,FS_ITALIC,10);
15
16
17$graph->SetTitles($titles);
18$graph->SetCenter(0.5,0.55);
19$graph->HideTickMarks(); 
20$graph->SetColor('lightyellow');
21$graph->axis->SetColor('darkgray@0.3'); 
22$graph->grid->SetColor('darkgray@0.3');
23$graph->grid->Show();
24
25$graph->SetGridDepth(DEPTH_BACK);
26
27$plot = new RadarPlot($data);
28$plot->SetColor('red@0.2');
29$plot->SetLineWeight(1);
30$plot->SetFillColor('red@0.7');
31$graph->Add($plot);
32$graph->Stroke();
33?>
Note: See TracBrowser for help on using the repository browser.