Line | |
---|
1 | <?php // content="text/plain; charset=utf-8" |
---|
2 | require_once ('jpgraph/jpgraph.php'); |
---|
3 | require_once ('jpgraph/jpgraph_line.php'); |
---|
4 | |
---|
5 | $ydata = array(12,17,22,19,5,15); |
---|
6 | |
---|
7 | $graph = new Graph(270,170); |
---|
8 | $graph->SetMargin(30,90,30,30); |
---|
9 | $graph->SetScale("textlin"); |
---|
10 | |
---|
11 | $graph->img->SetAngle(90); |
---|
12 | |
---|
13 | $line = new LinePlot($ydata); |
---|
14 | $line->SetLegend('2002'); |
---|
15 | $line->SetColor('darkred'); |
---|
16 | $line->SetWeight(2); |
---|
17 | $graph->Add($line); |
---|
18 | |
---|
19 | // Output graph |
---|
20 | $graph->Stroke(); |
---|
21 | |
---|
22 | ?> |
---|
23 | |
---|
24 | |
---|
Note: See
TracBrowser
for help on using the repository browser.