| 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 | $graph->img->SetAngle(90);
 | 
|---|
 | 12 | $graph->img->SetCenter(floor(270/2),floor(170/2));
 | 
|---|
 | 13 | 
 | 
|---|
 | 14 | $line = new LinePlot($ydata);
 | 
|---|
 | 15 | $line->SetLegend('2002');
 | 
|---|
 | 16 | $line->SetColor('darkred');
 | 
|---|
 | 17 | $line->SetWeight(2);
 | 
|---|
 | 18 | $graph->Add($line);
 | 
|---|
 | 19 | 
 | 
|---|
 | 20 | // Output graph
 | 
|---|
 | 21 | $graph->Stroke();
 | 
|---|
 | 22 | 
 | 
|---|
 | 23 | ?>
 | 
|---|
 | 24 | 
 | 
|---|
 | 25 | 
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.