SetMargin(40,140,60,40); // Enable antialias. Note with antiaaliasing only line weight=1 is supported. $graph->img->SetAntiAliasing(); $graph->title->Set("Example of contour plot"); $graph->title->SetFont(FF_ARIAL,FS_BOLD,14); // For contour plots it is custom to use a box style ofr the axis $graph->legend->SetPos(0.05,0.5,'right','center'); $graph->SetScale('intint'); $graph->SetAxisStyle(AXSTYLE_BOXOUT); $graph->xgrid->Show(); $graph->ygrid->Show(); // A simple contour plot with 19 isobars and flipped vertical range $cp = new ContourPlot($data,10,true); // Display the legend $cp->ShowLegend(); // Invert the legend to th lowest isobar is on top $cp->Invertlegend(); $graph->Add($cp); // ... and send the graph back to the browser $graph->Stroke(); ?>