1 | <?php // content="text/plain; charset=utf-8"
|
---|
2 | //require_once ('jpgraph/jpgraph.php');
|
---|
3 | //require_once ('jpgraph/jpgraph_line.php');
|
---|
4 | require_once("include_path_inc.php");
|
---|
5 | require_once("jpgraph.php");
|
---|
6 | require_once("jpgraph_line.php");
|
---|
7 | require_once("jpgraph_scatter.php");
|
---|
8 |
|
---|
9 | // Some data
|
---|
10 | $vdata = array(11,3,8,12,5,1,9,13,5,7);
|
---|
11 | $tdata = array(34,54,62,54,55,62,69,63,71,83);
|
---|
12 | $pdata = array(100,150,260,330,450,560,610,620,630,700);
|
---|
13 |
|
---|
14 | // Create the graph. These two calls are always required
|
---|
15 | //$vgraph = new Graph(350,250);
|
---|
16 | //$vgraph->SetScale('textlin');
|
---|
17 | $tgraph = new Graph(450,250);
|
---|
18 | $tgraph->SetScale('textlin');
|
---|
19 | //$pgraph = new Graph(550,250);
|
---|
20 | //$pgraph->SetScale('textlin');
|
---|
21 |
|
---|
22 | // Create the linear plot
|
---|
23 | $linevplot=new LinePlot($vdata);
|
---|
24 | $linevplot->SetColor('blue');
|
---|
25 | $linevplot->SetLegend('vacu');
|
---|
26 | $linetplot=new LinePlot($tdata);
|
---|
27 | $linetplot->SetColor('red');
|
---|
28 | $linetplot->SetLegend('temp');
|
---|
29 | $linepplot=new LinePlot($pdata);
|
---|
30 | $linepplot->SetColor('orange');
|
---|
31 | $linepplot->SetLegend('pres');
|
---|
32 |
|
---|
33 | $tgraph->AddLine($linevplot);
|
---|
34 | $tgraph->AddLine($linetplot);
|
---|
35 | $tgraph->AddLine($linepplot);
|
---|
36 |
|
---|
37 | // Add the plot to the graph
|
---|
38 | //$vgraph->Add($linevplot);
|
---|
39 | //$tgraph->Add($linetplot);
|
---|
40 | //$pgraph->Add($linepplot);
|
---|
41 |
|
---|
42 | // Display the graph
|
---|
43 | //$vgraph->Stroke();
|
---|
44 | $tgraph->Stroke();
|
---|
45 | //$pgraph->Stroke();
|
---|
46 | ?>
|
---|