2016-07-01 6 views
1

私は、プロットを使用しています。私は別のグラフの下にそれぞれのグラフを表示する必要があります。私は$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(); 

しかし、これは奇妙に見える:

enter image description here

私のコードで何が悪いですか?

http://pastebin.com/wejv5cpD

答えて

0

I`mは$plot->SetNewPlotAreaPixels($margin_left, $h * $i + $margin_top, $w - $margin_right, $h * ($i + 1) - $margin_bottom);$plot->SetPlotAreaPixels(null, $h * $i, null, $h);を交換して余白を設定します。今それは正常に動作します。

関連する問題