当前位置: 首页>>代码示例>>PHP>>正文


PHP Axis::addTick方法代码示例

本文整理汇总了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);
 }
开发者ID:greench,项目名称:prestashop,代码行数:24,代码来源:Plot.class.php

示例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();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:31,代码来源:Tools-2.test.php


注:本文中的Axis::addTick方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。