clearTheme(); $graph->SetScale("linlin"); $graph->img->SetMargin(40,100,40,40); $graph->SetShadow(); $graph->title->Set("Example of ballon scatter plot"); // Use a lot of grace to get large scales $graph->yaxis->scale->SetGrace(50,10); // Make sure X-axis as at the bottom of the graph $graph->xaxis->SetPos('min'); // Create the scatter plot $sp1 = new ScatterPlot($datay,$datax); $sp1->mark->SetType(MARK_FILLEDCIRCLE); // Uncomment the following two lines to display the values $sp1->value->Show(); $sp1->value->SetFont(FF_FONT1,FS_BOLD); // Specify the callback $sp1->mark->SetCallback("FCallback"); // Setup the legend for plot $sp1->SetLegend('Year 2002'); // Add the scatter plot to the graph $graph->Add($sp1); // ... and send to browser $graph->Stroke(); ?>