[ Index ] |
|
Code source de jpGraph 2.2 |
1 <?php 2 include ("../jpgraph.php"); 3 include ("../jpgraph_scatter.php"); 4 5 // Make a circle with a scatterplot 6 $steps=16; 7 for($i=0; $i<$steps; ++$i) { 8 $a=2*M_PI/$steps*$i; 9 $datax[$i]=cos($a); 10 $datay[$i]=sin($a); 11 } 12 13 $graph = new Graph(350,230,"auto"); 14 $graph->SetScale("linlin"); 15 $graph->SetShadow(); 16 $graph->SetAxisStyle(AXSTYLE_BOXIN); 17 18 $graph->img->SetMargin(50,50,60,40); 19 20 $graph->title->Set("Linked scatter plot"); 21 $graph->title->SetFont(FF_FONT1,FS_BOLD); 22 $graph->subtitle->Set("(BOXIN Axis style)"); 23 $graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); 24 25 26 // 10% top and bottom grace 27 $graph->yscale->SetGrace(5,5); 28 $graph->xscale->SetGrace(1,1); 29 30 $sp1 = new ScatterPlot($datay,$datax); 31 $sp1->mark->SetType(MARK_FILLEDCIRCLE); 32 $sp1->mark->SetFillColor("red"); 33 $sp1->SetColor("blue"); 34 35 //$sp1->SetWeight(3); 36 $sp1->mark->SetWidth(4); 37 $sp1->SetLinkPoints(); 38 39 $graph->Add($sp1); 40 41 $graph->Stroke(); 42 43 ?> 44 45
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Nov 24 09:27:55 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |