本文整理汇总了PHP中Axis::addTick方法的典型用法代码示例。如果您正苦于以下问题:PHP Axis::addTick方法的具体用法?PHP Axis::addTick怎么用?PHP Axis::addTick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axis
的用法示例。
在下文中一共展示了Axis::addTick方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Build the plot
*
*/
public function __construct()
{
parent::__construct();
$this->grid = new awGrid();
$this->grid->setBackgroundColor(new awWhite());
$this->padding->add(20, 0, 0, 20);
$this->xAxis = new awAxis();
$this->xAxis->addTick('major', new awTick(0, 5));
$this->xAxis->addTick('minor', new awTick(0, 3));
$this->xAxis->setTickStyle(awTick::OUT);
$this->xAxis->label->setFont(new awTuffy(7));
$this->yAxis = new awAxis();
$this->yAxis->auto(TRUE);
$this->yAxis->addTick('major', new awTick(0, 5));
$this->yAxis->addTick('minor', new awTick(0, 3));
$this->yAxis->setTickStyle(awTick::OUT);
$this->yAxis->setNumberByTick('minor', 'major', 3);
$this->yAxis->label->setFont(new awTuffy(7));
$this->yAxis->title->setAngle(90);
}
示例2: DarkGray
$yAxis->label->set($labels);
$yAxis->label->setColor(new DarkGray());
$yAxis->label->setAlign(LABEL_RIGHT);
$yAxis->label->setFont(new Tuffy(7));
$yAxis->label->move(-5, 0);
$tick = new Tick(0, 2);
$yAxis->addTick('minor', $tick);
$tick = new Tick(11, 5);
$yAxis->addTick('major', $tick);
$yAxis->setNumberByTick('minor', 'major', 3);
$xAxis->setYCenter($yAxis, 0);
$yAxis->setXCenter($xAxis, 0);
$xAxis->draw($driver);
$yAxis->draw($driver);
for ($x = -10; $x <= 10; $x += 0.1) {
$p = Axis::toPosition($xAxis, $yAxis, new Point($x, cos($x) * 4));
$driver->point(new Red(), $p);
}
// Vertical axis
$axis = new Axis();
//$axis->line->setThickness(2);
$axis->setRange(8, -8);
$axis->setPadding(10, 10);
$axis->line->setLocation(new Point(20, 260), new Point(380, 380));
$tick = new Tick(0, 4);
$axis->addTick('minor', $tick);
$tick = new Tick(11, 8);
$axis->addTick('major', $tick);
$axis->setNumberByTick('minor', 'major', 3);
$axis->draw($driver);
$graph->draw();