本文整理汇总了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);