Código PHP:
$alerta=array
(
array("",13,13),
array("",15,16),
array("",17,18.2),
array("",19,20.3),
array("",21,22),
array("",23,24),
array("",25,25.5),
array("",27,27.3),
array("",29,28.5),
array("",31,30.2),
array("",33,31.5),
array("",35,33),
array("",37,34),
array("",39,34.7),
array("",40,35)
);
$alerta1=array
(
array("",13,7.9),
array("",15,10),
array("",17,12.2),
array("",19,14),
array("",21,15.8),
array("",23,17.5),
array("",25,19.4),
array("",27,21.2),
array("",29,22.9),
array("",31,24.5),
array("",33,26),
array("",35,27.4),
array("",37,29.2),
array("",39,30.5),
array("",40,31)
);
$graph = new PHPlot(650,450);
$graph->SetPrintImage(0);
$graph->SetDataType("data-data");
$graph->SetDataValues($alerta1);
$graph->SetNewPlotAreaPixels(40,40,600,400);
$graph->SetPlotType("lines");
$graph->SetTitle("Altura Uterina");
$graph->SetYTitle("Altura Uterina (cm)");
$graph->SetXTitle("Semanas de amenorrea (Semanas)");
$graph->SetBackgroundColor("white");
$graph->SetPointShape("circle");
$graph->SetVertTickIncrement(2);
$graph->SetHorizTickIncrement(2);
$graph->SetTickLength(1);
$graph->SetDataColors("red");
//$graph->SetLegend(array("asdas","assss"));
//$graph->SetLegendPixels(50,100);
$graph->SetTextColor("black");
$graph->DrawGraph();
//Graficamos la linea de alerta
$graph->SetDataType("data-data");
$graph->SetDataValues($alerta);
$graph->SetNewPlotAreaPixels(40,40,600,400);
$graph->SetPlotType("lines");
$graph->SetTitle("Altura Uterina");
$graph->SetYTitle("Altura Uterina (cm)");
$graph->SetXTitle("Semanas de amenorrea (Semanas)");
$graph->SetBackgroundColor("white");
$graph->SetPointShape("circle");
$graph->SetVertTickIncrement(2);
$graph->SetHorizTickIncrement(2);
$graph->SetTickLength(1);
$graph->SetDataColors("red");
//$graph->SetLegend(array("asdas","assss"));
//$graph->SetLegendPixels(50,100);
$graph->SetTextColor("black");
$graph->DrawGraph();
$graph->PrintImage();