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


PHP LinePlot::setAbsSize方法代码示例

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


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

示例1: color

 * 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";
function color($a = NULL)
{
    if ($a === NULL) {
        $a = mt_rand(0, 100);
    }
    return new Color(mt_rand(20, 180), mt_rand(20, 180), mt_rand(20, 180), $a);
}
$graph = new Graph(400, 300);
$graph->setBackgroundColor(new Color(175, 175, 175));
$x = array(mt_rand(-20, 20), 42, mt_rand(-20, 20), 15, 80, 42, 42, mt_rand(-20, 20));
$plot = new LinePlot($x);
$plot->setBackgroundImage(new FileImage("42.png"));
$plot->setAbsSize(350, 250);
$plot->setCenter(0.5, 0.5);
$plot->setThickness(mt_rand(4, 6));
$plot->setFillColor(color());
$plot->grid->setColor(new Color(0, 200, 42));
$plot->grid->hide(FALSE);
$plot->grid->setColor(new Color(255, 25, 160));
$plot->yAxis->label->hideFirst(FALSE);
$plot->yAxis->label->setFont(new Font2());
$plot->xAxis->setNumberByTick('minor', 'major', 2);
$plot->xAxis->label->hideFirst(TRUE);
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:31,代码来源:LinePlot-2.test.php

示例2: color

 * 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";
function color()
{
    return new Color(mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 100));
}
$width = mt_rand(200, 400);
$graph = new Graph($width, 400);
$graph->setAntiAliasing(TRUE);
$graph->setBackgroundColor(new Color(50, 50, 50));
$x = array(-100, 35, -20, 15, 79, -50);
$plot = new LinePlot($x);
$plot->setAbsSize($width - 20, 380);
$plot->setAbsPosition(mt_rand(0, 20), mt_rand(0, 20));
$plot->setThickness(mt_rand(2, 5));
$plot->setBackgroundGradient(new LinearGradient(color(), color(), mt_rand(0, 1) * 90));
$plot->yAxis->setLabelNumber(mt_rand(0, 10));
/*
$plot->setYMin(-80);
$plot->setYMax(120);
*/
$plot->xAxis->setLabelInterval(2);
$plot->xAxis->setTickInterval(2);
$major = $plot->xAxis->tick('major');
$major->setSize(10);
$minor = $plot->xAxis->tick('minor');
$minor->setSize(6);
$plot->xAxis->setNumberByTick('minor', 'major', 4);
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:31,代码来源:LinePlot-3.test.php


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