SetScale("textlin"); // Setup margin and titles $graph->img->SetMargin(40,20,20,40); $graph->title->Set("Example 2"); $graph->xaxis->title->Set("X-title"); $graph->yaxis->title->Set("Y-title"); // Create the linear plot $lineplot=new LinePlot($ydata); // Add the plot to the graph $graph->Add($lineplot); // Display the graph $graph->Stroke(); ?>