本文整理匯總了PHP中Axis::setColor方法的典型用法代碼示例。如果您正苦於以下問題:PHP Axis::setColor方法的具體用法?PHP Axis::setColor怎麽用?PHP Axis::setColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Axis
的用法示例。
在下文中一共展示了Axis::setColor方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Graph
/*
* This work is hereby released into the Public Domain.
* To view a copy of the public domain dedication,
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
* Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
*
*/
require_once "../../Graph.class.php";
$graph = new Graph(400, 400);
$graph->setAntiAliasing(FALSE);
// TRUE est bogus sa mère
$graph->title->set("Axis");
$driver = $graph->getDriver();
// Horizontal axis
$xAxis = new Axis();
$xAxis->setColor(new MidBlue());
//$xAxis->line->setThickness(2);
$xAxis->setRange(-10, 10);
$xAxis->setPadding(20, 20);
$xAxis->line->setX(10, 390);
$labels = array();
for ($i = -10; $i <= 10; $i++) {
if ($i !== 0) {
$labels[] = $i;
}
}
$xAxis->label->set($labels);
$xAxis->label->setColor(new DarkGray());
$xAxis->label->setFont(new Tuffy(7));
$xAxis->label->move(0, 8);
$tick = new Tick(0, 2);