Push(); // Create the graph. These two calls are always required $graph = new Graph(800,400); $graph->SetScale("textlin"); $graph->SetMargin(60,120,20,140); $graph->title->Set("System/CPU temparature (produced by JpGraph)"); // Create the linear plot $lineplot=new LinePlot($ydata); $lineplot2=new LinePlot($ydata2); // Add the plot to the graph $graph->Add($lineplot); $graph->Add($lineplot2); $graph->xaxis->SetTitle("Time", "center"); $graph->yaxis->SetTitle("Celsius", "middle"); $graph->title->SetFont(FF_PMINCHO); $graph->yaxis->title->SetFont(FF_PMINCHO); $graph->xaxis->title->SetFont(FF_PMINCHO); $graph->yaxis->SetTitlemargin(30); $graph->xaxis->SetTitlemargin(100); $graph->yaxis->SetFont(FF_PMINCHO); $graph->xaxis->SetFont(FF_PMINCHO); $graph->legend->SetFont(FF_PMINCHO); $lineplot->SetColor("blue"); $lineplot->SetWeight(1); $lineplot->value->SetFont(FF_PMINCHO,FS_NORMAL,5); $lineplot->value->Show(); $lineplot2->SetColor("orange"); $lineplot2->SetWeight(1); $lineplot2->value->SetFont(FF_PMINCHO,FS_NORMAL,5); $lineplot2->value->SetColor("orange"); $lineplot2->value->Show(); //$lineplot2->value->show(); $graph->yaxis->SetColor("red"); $graph->yaxis->SetWeight(1); //$graph->yaxis->SetTickSide(SIDE_LEFT); //$graph->yaxis->SetLabelSide(SIDE_RIGHT); //$graph->yaxis->SetLabelPos(SIDE_RIGHT); $graph->SetShadow(); $lineplot->SetLegend("System"); $lineplot2->SetLegend("CPU"); $graph->legend->Pos(0.03,0.3,"right","center"); $graph->xaxis->SetTickLabels($xdata); $graph->xaxis->SetTextLabelInterval(1); $graph->xaxis->SetTextTickInterval(1); $graph->xaxis->SetLabelAngle(60); // Display the graph $graph->Stroke(); ?>