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


PHP LinePlot::setSize方法代码示例

本文整理汇总了PHP中LinePlot::setSize方法的典型用法代码示例。如果您正苦于以下问题:PHP LinePlot::setSize方法的具体用法?PHP LinePlot::setSize怎么用?PHP LinePlot::setSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LinePlot的用法示例。


在下文中一共展示了LinePlot::setSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

 public function create()
 {
     $legend = $this->getArg('legend');
     $y = $this->getArg('y');
     if ($y === NULL) {
         awImage::drawError("Class LightLinePattern: Argument 'y' must not be NULL.");
     }
     $plot = new LinePlot($y);
     $plot->setSize(0.7, 1);
     $plot->setCenter(0.35, 0.5);
     $plot->setPadding(35, 15, 35, 30);
     $plot->setColor(new Orange());
     $plot->setFillColor(new LightOrange(80));
     $plot->grid->setType(Line::DASHED);
     $plot->mark->setType(Mark::CIRCLE);
     $plot->mark->setFill(new MidRed());
     $plot->mark->setSize(6);
     $plot->legend->setPosition(1, 0.5);
     $plot->legend->setAlign(Legend::LEFT);
     $plot->legend->shadow->smooth(TRUE);
     if ($legend !== NULL) {
         $plot->legend->add($plot, $legend, Legend::MARK);
     }
     return $plot;
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:25,代码来源:LightLine.php

示例2: 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 "../LinePlot.class.php";
$graph = new Graph(375, 200);
// Set title
$graph->title->set('Star marks');
$graph->title->setFont(new Tuffy(12));
$graph->title->setColor(new DarkRed());
$plot = new LinePlot(array(5, 3, 4, 7, 6, 5, 8, 4, 7));
// Change plot size and position
$plot->setSize(0.76, 1);
$plot->setCenter(0.38, 0.5);
$plot->setPadding(30, 15, 38, 25);
$plot->setColor(new Orange());
$plot->setFillColor(new LightOrange(80));
// Change grid style
$plot->grid->setType(LINE_DASHED);
// Add customized  marks
$plot->mark->setType(MARK_STAR);
$plot->mark->setFill(new MidRed());
$plot->mark->setSize(6);
// Change legend
$plot->legend->setPosition(1, 0.5);
$plot->legend->setAlign(LEGEND_LEFT);
$plot->legend->shadow->smooth(TRUE);
$plot->legend->add($plot, 'My line', LEGEND_MARK);
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:31,代码来源:line-010.php

示例3: LinearGradient

 if (mt_rand(0, 1) === 0) {
     $plot->setBackgroundGradient(new LinearGradient(color(), color(), mt_rand(0, 1) * 90));
 } else {
     $plot->setBackgroundColor(color());
 }
 $mark = mt_rand(1, 2);
 $plot->mark->setType($mark);
 $plot->mark->setSize(mt_rand(3, 16));
 $plot->mark->border->show();
 if ($mark === 1 or mt_rand(0, 1) === 1) {
     $plot->mark->setFill(color());
 } else {
     $plot->mark->setFill(new LinearGradient(color(), color(), 0));
 }
 $plot->mark->border->setColor(color());
 $plot->setSize(0.33 + $i / 2 + mt_rand(0, 15) / 100, 0.33 + mt_rand(0, 15) / 100);
 $plot->setCenter(0.25 + $i / 4 + (1 - $i) * mt_rand(0, 40) / 100, 0.25 + $i / 2 - $i * mt_rand(0, 10) / 100);
 $plot->grid->setColor(new Color(160, 200 * ($i - 1), 42 * $i));
 $plot->grid->hide(FALSE);
 $plot->grid->setBackgroundColor(new Color(235 - 20 * $i, 235 + 20 * $i, 180, 50));
 $plot->setYAxis(mt_rand(0, 1) ? PLOT_RIGHT : PLOT_LEFT);
 $plot->setXAxis(mt_rand(0, 1) ? PLOT_TOP : PLOT_BOTTOM);
 $plot->setPadding(NULL, NULL, 40, NULL);
 $plot->yAxis->label->hideFirst((bool) $i);
 $plot->yAxis->setLabelPrecision(2 - $i);
 $plot->yAxis->setColor(new Color(124 / ($i + 1), 50, 20));
 $plot->yAxis->setNumberByTick('minor', 'major', $i * 2);
 $plot->yAxis->label->setFont(new Font3());
 $plot->yAxis->label->setAngle($i ? 90 : 0);
 $plot->yAxis->label->setColor(new Color(124 / ($i + 1), 20, 200));
 $plot->xAxis->setNumberByTick('minor', 'major', 2 + $i);
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:31,代码来源:LinePlot-4.test.php


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