Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
include ("../jpgraph.php");
3
include ("../jpgraph_error.php");
4
 
5
$errdatay = array(11,9,2,4,19,26,13,19,7,12);
6
 
7
 
8
// Create the graph. These two calls are always required
9
$graph = new Graph(300,200,"auto");
10
$graph->SetScale("textlin");
11
 
12
$graph->img->SetMargin(40,30,20,40);
13
$graph->SetShadow();
14
 
15
// Create the error plot
16
$errplot=new ErrorPlot($errdatay);
17
$errplot->SetColor("red");
18
$errplot->SetWeight(2);
19
 
20
// Add the plot to the graph
21
$graph->Add($errplot);
22
 
23
$graph->title->Set("Simple error plot");
24
$graph->xaxis->title->Set("X-title");
25
$graph->yaxis->title->Set("Y-title");
26
 
27
$graph->title->SetFont(FF_FONT1,FS_BOLD);
28
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
29
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
30
 
31
$datax = $gDateLocale->GetShortMonth();
32
$graph->xaxis->SetTickLabels($datax);
33
 
34
// Display the graph
35
$graph->Stroke();
36
?>