title->Set('Accumulated values with specified X-axis scale'); $graph->SetScale('textlin'); // Setup margin color $graph->SetMarginColor('green@0.95'); // Adjust the margin to make room for the X-labels $graph->SetMargin(40,30,40,120); // Turn the tick marks out from the plot area $graph->xaxis->SetTickSide(SIDE_BOTTOM); $graph->yaxis->SetTickSide(SIDE_LEFT); $p0 =new LinePlot($ydata[0]); $p0->SetFillColor('sandybrown'); $p1 =new LinePlot($ydata[1]); $p1->SetFillColor('lightblue'); $p2 =new LinePlot($ydata[2]); $p2->SetFillColor('red'); $ap = new AccLinePlot(array($p0,$p1,$p2)); $graph->xaxis->SetTickLabels($xdata); $graph->xaxis->SetTextLabelInterval(4); // Add the plot to the graph $graph->Add($ap); // Set the angle for the labels to 90 degrees $graph->xaxis->SetLabelAngle(90); // Display the graph $graph->Stroke(); ?>