我使用的是phplot。我需要在另一个图的下面显示每个图。我尝试使用$plot->SetPlotAreaPixels()方法来做这件事,但它的工作不正确。
$data = array(
// plots data
);
$w = 1600; // width
$h = 280; // one graph height
$plot = new PHPlot($w, $h * count($data));
$plot->SetPrintImage(0);
// ... more settings ...
$i = 0;
foreach (array_keys($data) as $title) {
$plot->SetPlotAreaPixels(null, $h * $i, null, $h);
$plot->SetDataValues($data[$title]);
$plot->DrawGraph();
$i++;
}
$plot->PrintImage();但这看起来很奇怪:

我的代码出了什么问题?
http://pastebin.com/wejv5cpD
发布于 2016-07-01 19:28:15
Im replace$plot->SetPlotAreaPixels(null,$h $i,null,$h);to$plot->SetNewPlotAreaPixels($margin_left,$h $i + $margin_top,$w - $margin_right,$h * ($i + 1) - $margin_bottom);`并设置页边距。现在它工作得很好。
https://stackoverflow.com/questions/38135261
复制相似问题