Rev | Line | |
---|
[42] | 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 | $line = new LinePlot($ydata);
|
---|
| 12 | $line->SetLegend('2002');
|
---|
| 13 | $line->SetColor('darkred');
|
---|
| 14 | $line->SetWeight(2);
|
---|
| 15 | $graph->Add($line);
|
---|
| 16 |
|
---|
| 17 | // Output graph
|
---|
| 18 | $graph->Stroke();
|
---|
| 19 |
|
---|
| 20 | ?>
|
---|
| 21 |
|
---|
| 22 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.