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(250,170); |
---|
| 8 | $graph->SetScale("textlin",3,35); |
---|
| 9 | $graph->SetTickDensity(TICKD_DENSE); |
---|
| 10 | $graph->yscale->SetAutoTicks(); |
---|
| 11 | |
---|
| 12 | $graph->title->Set('Manual scale, auto ticks'); |
---|
| 13 | $graph->title->SetFont(FF_FONT1,FS_BOLD); |
---|
| 14 | |
---|
| 15 | $line = new LinePlot($ydata); |
---|
| 16 | $graph->Add($line); |
---|
| 17 | |
---|
| 18 | // Output graph |
---|
| 19 | $graph->Stroke(); |
---|
| 20 | |
---|
| 21 | ?> |
---|
| 22 | |
---|
| 23 | |
---|
Note: See
TracBrowser
for help on using the repository browser.