JpGraph을 사용하여 일부 데이터를 그래프로 나타냅니다. SetScale 함수를 사용하여 y 축 범위를 강제로 지정하면 출력이 시각적으로 그래프 영역을 오버플로합니다. 출력을 그래프 영역으로 잘라 내고 싶습니다.JpGraph SetScale을 사용할 때 LinePlot 출력이 그래프 영역을 초과합니다.
<?php
require_once ('include/jpgraph/jpgraph.php');
require_once ('include/jpgraph/jpgraph_line.php');
$datay1 = array(20,7,16,46,90,5,0,5,95);
// Setup the graph
$graph = new Graph(400,300);
$graph->title->Set('Graph Title');
$graph->title->font_size = 20;
$graph->SetScale("textlin",20,50);
//this version works but does not set the y-axis scale
//$graph->SetScale("textlin");
$p1 = new LinePlot($datay1);
$graph->Add($p1);
// Output line
$graph->Stroke();
?>
이 현재 출력 :
이 문제를 조사한 결과 답변을 찾을 수 없으므로 +1했습니다. 나는 지금도 호기심이 많다. – DrewP84