clearTheme(); $graph->SetScale("intlin"); $graph->SetMargin(40,40,40,40); $graph->SetMarginColor('wheat'); $graph->title->Set("Example of ballon scatter plot with X,Y callback"); $graph->title->SetFont(FF_ARIAL,FS_BOLD,12); $graph->title->SetMargin(10); // Use a lot of grace to get large scales since the ballon have // size and we don't want them to collide with the X-axis $graph->yaxis->scale->SetGrace(50,10); $graph->xaxis->scale->SetGrace(50,10); // Make sure X-axis as at the bottom of the graph and not at the default Y=0 $graph->xaxis->SetPos('min'); // Set X-scale to start at 0 $graph->xscale->SetAutoMin(0); // 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->SetCallbackYX("FCallback"); // Add the scatter plot to the graph $graph->Add($sp1); // ... and send to browser $graph->Stroke(); ?>