Blame view

site/jpgraph/Examples/rotex3.php 518 Bytes
8ec98c9f   Guillaume   MAJ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <?php // content="text/plain; charset=utf-8"
  require_once ('jpgraph/jpgraph.php');
  require_once ('jpgraph/jpgraph_line.php');
  
  $ydata = array(12,17,22,19,5,15);
  
  $graph = new Graph(270,170);
  $graph->clearTheme();
  $graph->SetMargin(30,90,30,30);
  $graph->SetScale("textlin");
  
  $graph->img->SetAngle(45);
  $graph->img->SetCenter(floor(270/2),floor(170/2));
  
  $line = new LinePlot($ydata);
  $line->SetLegend('2002');
  $line->SetColor('darkred');
  $line->SetWeight(2);
  $graph->Add($line);
  
  // Output graph
  $graph->Stroke();
  
  ?>