File: C:/xampp/htdocs/ACProof/gamut.php
<?php // content="text/plain; charset=utf-8"
require_once ('../jpgraph/jpgraph.php');
require_once ('../jpgraph/jpgraph_scatter.php');
$datax = array(-37,22,74,68,-5,-65,-37);
$datay = array(-50,-46,-3,48,93,27,-50);
$datax2 = array(-29,31,75,72,-7,-71,-29);
$datay2 = array(-49,-54,4,62,90,27,-49);
$datax3 = array(-37,22,74,71,-8,-67,-37);
$datay3 = array(-50,-48,2.8,57,86,23,-50);
$graph = new Graph(600,600);
$graph->img->SetMargin(40,40,40,40);
$graph->img->SetAntiAliasing();
$graph->SetScale("linlin");
$graph->SetShadow();
$graph->title->Set("Linked Scatter plot ex1");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
//$graph->SetBackgroundImage("lab.png",BGIMG_FILLFRAME);
//$sp1->SetColor("#55bbdd");
//$sp1->SetLegend('Line 1');
$sp1 = new ScatterPlot($datay,$datax);
$sp1->SetLinkPoints(true,"red",2);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->mark->SetWidth(3);
$sp2 = new ScatterPlot($datay2,$datax2);
$sp2->SetLinkPoints(true,"blue",2);
$sp2->mark->SetType(MARK_FILLEDCIRCLE);
$sp2->mark->SetFillColor("navy");
$sp2->mark->SetWidth(3);
$sp3 = new ScatterPlot($datay3,$datax3);
$sp3->SetLinkPoints(true,"green",2);
$sp3->mark->SetType(MARK_FILLEDCIRCLE);
$sp3->mark->SetFillColor("green");
$sp3->mark->SetWidth(3);
$graph->Add($sp1);
$graph->Add($sp2);
$graph->Add($sp3);
//$graph->Stroke();
$graph->Stroke('imagefile.png');
?>