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_line.php");
4
 
5
$ydata = array(11,-3,-8,7,5,-1,9,13,5,-7);
6
 
7
// Create the graph. These two calls are always required
8
$graph = new Graph(300,200,"auto");
9
$graph->SetScale("textlin");
10
 
11
// Create the linear plot
12
$lineplot=new LinePlot($ydata);
13
 
14
// Add the plot to the graph
15
$graph->Add($lineplot);
16
 
17
$graph->img->SetMargin(40,20,20,40);
18
$graph->title->Set("Example 2.5");
19
$graph->xaxis->title->Set("X-title");
20
$graph->xaxis->SetPos("min");
21
$graph->yaxis->title->Set("Y-title");
22
 
23
 
24
// Display the graph
25
$graph->Stroke();
26
?>