Subversion Repositories Sites.obs-saisons.fr

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

<?
$jpgraph = "/usr/local/lib/php/jpgraph-1.17";
include ("$jpgraph/jpgraph.php");
include ("$jpgraph/jpgraph_line.php");

// Some data
$ydata = array(11,3, 8,12,5 ,1,9, 13,5,7 );

// Create the graph. These two calls are always required
$graph = new Graph(350, 250,"auto");    
$graph->SetScale( "textint");

$annees = array('2000','2005','2010');
$graph->xaxis->SetTickLabels($annees); 

// Create the linear plot
$lineplot =new LinePlot($ydata);
$lineplot ->SetColor("blue");

// Add the plot to the graph
$graph->Add( $lineplot);

//Un peu de forme
$graph->title->Set("Date de floraison du pommier");
$graph->img->SetMargin(40,20,20,40);
$graph->xaxis->title->Set("Année");
$graph->yaxis->title->Set("Date observée");
 $graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); 
 $lineplot->mark->SetType(MARK_SQUARE);

// Display the graph
$graph->Stroke(); 
?>