source: trunk/xgraph/xfel2.php @ 42

Last change on this file since 42 was 42, checked in by marrucho, 10 years ago
File size: 954 bytes
Line 
1<?php // content="text/plain; charset=utf-8"
2require_once ('jpgraph/jpgraph.php');
3require_once ('jpgraph/jpgraph_line.php');
4
5$ydata = array(12,19,3,9,15,10,13,16,9,11,16,14,16,15,19,18,9,15);
6
7// The code to setup a very basic graph
8$graph = new Graph(300,250);
9$graph->SetScale('intlin');
10$graph->SetMargin(30,15,40,30);
11$graph->SetMarginColor('white');
12$graph->SetFrame(true,'blue',3);
13
14$graph->title->Set('Stand A');
15$graph->title->SetFont(FF_FONT0,FS_BOLD,12);
16
17$graph->subtitle->SetFont(FF_FONT0,FS_NORMAL,10);
18$graph->subtitle->SetColor('darkred');
19$graph->subtitle->Set('"Vacuum Level"');
20
21$graph->SetAxisLabelBackground(LABELBKG_XY,'orange','red','lightblue','red');
22
23// Use font
24$graph->xaxis->SetFont(FF_FONT0,FS_NORMAL,9);
25$graph->yaxis->SetFont(FF_FONT0,FS_NORMAL,9);
26$graph->xgrid->Show();
27
28// Create the plot line
29$p1 = new LinePlot($ydata);
30$graph->Add($p1);
31
32// Output graph
33$graph->Stroke();
34
35?>
36
37
Note: See TracBrowser for help on using the repository browser.