[ Index ] |
|
Code source de jpGraph 2.2 |
1 <?php 2 include ("../jpgraph.php"); 3 include ("../jpgraph_line.php"); 4 include ("../jpgraph_error.php"); 5 6 $errdatay = array(11,9,2,4,19,26,13,19,7,12); 7 8 // Create the graph. These two calls are always required 9 $graph = new Graph(300,200,"auto"); 10 $graph->SetScale("textlin"); 11 12 $graph->img->SetMargin(40,30,20,40); 13 $graph->SetShadow(); 14 15 // Create the linear plot 16 $errplot=new ErrorLinePlot($errdatay); 17 $errplot->SetColor("red"); 18 $errplot->SetWeight(2); 19 $errplot->SetCenter(); 20 $errplot->line->SetWeight(2); 21 $errplot->line->SetColor("blue"); 22 23 // Setup the legends 24 $errplot->SetLegend("Min/Max"); 25 $errplot->line->SetLegend("Average"); 26 27 // Add the plot to the graph 28 $graph->Add($errplot); 29 30 $graph->title->Set("Linear error plot"); 31 $graph->xaxis->title->Set("X-title"); 32 $graph->yaxis->title->Set("Y-title"); 33 34 $graph->title->SetFont(FF_FONT1,FS_BOLD); 35 $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); 36 $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); 37 38 $datax = $gDateLocale->GetShortMonth(); 39 $graph->xaxis->SetTickLabels($datax); 40 41 42 // Display the graph 43 $graph->Stroke(); 44 ?>
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 |
![]() |