本文整理匯總了PHP中Plot::drawAxis方法的典型用法代碼示例。如果您正苦於以下問題:PHP Plot::drawAxis方法的具體用法?PHP Plot::drawAxis怎麽用?PHP Plot::drawAxis使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Plot
的用法示例。
在下文中一共展示了Plot::drawAxis方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: imagecolorallocate
$vAxisColor = imagecolorallocate($vImage, 0, 0, 0);
$vDotColor = imagecolorallocate($vImage, 192, 64, 64);
imagefill($vImage, 0, 0, $vBgColor);
$oPlot = new Plot($aCoords);
$oPlot->drawDots($vImage, $vDotColor, 10, GRAPH_HEIGHT, 8);
$oCurve = new CubicSplines();
$vColor = imagecolorallocate($vImage, 225, 64, 64);
$iStart = microtime(1);
if ($oCurve) {
$oCurve->setInitCoords($aCoords, 1);
$r = $oCurve->processCoords();
if ($r) {
$curveGraph = new Plot($r);
} else {
continue;
}
} else {
$curveGraph = $oPlot;
}
$curveGraph->drawLine($vImage, $vColor, 10, GRAPH_HEIGHT);
// unset($oCurve);
$sTime = sprintf("%1.4f", microtime(1) - $iStart);
imagefilledrectangle($vImage, 0, GRAPH_HEIGHT, GRAPH_WIDTH + 50, $vImagegHeight, $vBgColor);
$oPlot->drawAxis($vImage, $vAxisColor, 10, GRAPH_HEIGHT);
$iPanelY = GRAPH_HEIGHT;
imagefilledrectangle($vImage, 10, $iPanelY + 10, 20, $iPanelY + 20, $vColor);
imagerectangle($vImage, 10, $iPanelY + 10, 20, $iPanelY + 20, $vAxisColor);
imagettftext($vImage, 10, 0, 30, $iPanelY + 20, $vTextColor, 'Ds-digib.ttf', 'Cubic splines in PHP for graphs: ' . $sTime . ' sec');
header("Content-type: image/png");
imagepng($vImage);
imagedestroy($vImage);