SetMargin(40,40,30,130); // Fix the Y-scale to go between [0,100] and use date for the x-axis $graph->SetScale('datlin',0,100); $graph->title->Set("Example on Date scale"); // Set the angle for the labels to 90 degrees $graph->xaxis->SetLabelAngle(90); // The automatic format string for dates can be overridden $graph->xaxis->scale->SetDateFormat('H:i'); // Adjust the start/end to a specific alignment $graph->xaxis->scale->SetTimeAlign(MINADJ_10); $line = new LinePlot($data,$xdata); $line->SetLegend('Year 2005'); $line->SetFillColor('lightblue@0.5'); $graph->Add($line); $graph->Stroke(); ?>