[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 include ("../jpgraph.php"); 3 include ("../jpgraph_log.php"); 4 include ("../jpgraph_line.php"); 5 6 $ydata = array(11,3,8,12,5,1,9,13,5,7); 7 $y2data = array(354,200,265,99,111,91,198,225,293,251); 8 9 // Create the graph. These two calls are always required 10 $graph = new Graph(350,200,"auto"); 11 $graph->img->SetMargin(40,110,20,40); 12 $graph->SetScale("textlog"); 13 $graph->SetY2Scale("log"); 14 $graph->SetShadow(); 15 16 // Create the linear plot 17 $lineplot=new LinePlot($ydata); 18 $lineplot2=new LinePlot($y2data); 19 20 // Add the plot to the graph 21 $graph->Add($lineplot); 22 $graph->AddY2($lineplot2); 23 $lineplot2->SetColor("orange"); 24 $lineplot2->SetWeight(2); 25 $graph->y2axis->SetColor("orange"); 26 27 $graph->title->Set("Example 7"); 28 $graph->xaxis->title->Set("X-title"); 29 $graph->yaxis->title->Set("Y-title"); 30 31 $graph->title->SetFont(FF_FONT1,FS_BOLD); 32 $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); 33 $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); 34 35 $lineplot->SetColor("blue"); 36 $lineplot->SetWeight(2); 37 38 $lineplot2->SetColor("orange"); 39 $lineplot2->SetWeight(2); 40 41 $graph->yaxis->SetColor("blue"); 42 43 $lineplot->SetLegend("Plot 1"); 44 $lineplot2->SetLegend("Plot 2"); 45 46 $graph->legend->Pos(0.05,0.5,"right","center"); 47 48 // Display the graph 49 $graph->Stroke(); 50 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |