Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
// A simple Polar graph,
3
 
4
include "../jpgraph.php";
5
include "../jpgraph_polar.php";
6
 
7
 
8
$data = array(0,1,30,2,30,25,40,60,
9
	      50,110,60,160,70,210,75,230,80,260,85,370,
10
	      90,480,
11
	      95,370,100,260,105,230,
12
	      110,210,120,160,130,110,140,60,
13
	      150,25,150,2,180,1);
14
 
15
$graph = new PolarGraph(300,350);
16
$graph->SetScale('log',100);
17
$graph->SetType(POLAR_180);
18
$graph->SetPlotSize(220,250);
19
 
20
// Hide frame around graph (by setting width=0)
21
$graph->SetFrame(true,'white',1);
22
 
23
$graph->SetBackgroundGradient('blue:1.3','brown:1.4',GRAD_HOR,BGRAD_PLOT);
24
 
25
// Set color for gradient lines
26
$graph->axis->SetGridColor('gray','gray','gray');
27
 
28
// Setup axis title
29
$graph->axis->SetTitle('Coverage (in meter)','middle');
30
$graph->axis->title->SetFont(FF_FONT1,FS_BOLD);
31
 
32
$graph->title->Set('Polar plot #7');
33
$graph->title->SetFont(FF_ARIAL,FS_BOLD,16);
34
$graph->title->SetColor('navy');
35
 
36
// Adjust legen box position and color
37
$graph->legend->SetColor('navy','darkgray');
38
$graph->legend->SetFillColor('white');
39
$graph->legend->SetShadow('darkgray@0.5',5);
40
 
41
$p = new PolarPlot($data);
42
$p->SetFillColor('lightblue@0.5');
43
$p->mark->SetType(MARK_SQUARE);
44
$p->SetLegend("Mirophone #1\n(No amps)");
45
 
46
$graph->Add($p);
47
 
48
$graph->Stroke();
49
 
50
?>