[ Index ]
 

Code source de jpGraph 2.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/src/Examples/ -> scatterex2.php (source)

   1  <?php
   2  include  ("../jpgraph.php");
   3  include  ("../jpgraph_scatter.php");
   4  
   5  $datax = array(3.5,3.7,3,4,6.2,6,3.5,8,14,8,11.1,13.7);
   6  $datay = array(20,22,12,13,17,20,16,19,30,31,40,43);
   7  
   8  $graph = new Graph(300,200,"auto");
   9  $graph->SetScale("linlin");
  10  
  11  $graph->img->SetMargin(40,40,40,40);        
  12  $graph->SetShadow();
  13  
  14  $graph->title->Set("A simple scatter plot");
  15  $graph->title->SetFont(FF_FONT1,FS_BOLD);
  16  
  17  $sp1 = new ScatterPlot($datay,$datax);
  18  $sp1->mark->SetType(MARK_FILLEDCIRCLE);
  19  $sp1->mark->SetFillColor("red");
  20  $sp1->mark->SetWidth(8);
  21  
  22  $graph->Add($sp1);
  23  $graph->Stroke();
  24  
  25  ?>


Généré le : Sat Nov 24 09:27:55 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics