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


PHP ScatterPlot::link方法代码示例

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


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

示例1: Graph

<?php

require_once "../../ScatterPlot.class.php";
$graph = new Graph(300, 280);
$graph->title->set('Linked ScatterPlot');
$graph->title->setFont(new TuffyItalic(14));
$graph->shadow->setSize(4);
$y = array(1, 10, 7, 8, 5, 4, 2, 4);
$x = array(0.5, 0.5, 1.5, 4, 3, 5, 2, 2);
$plot = new ScatterPlot($y, $x);
$plot->setBackgroundColor(new Color(235, 235, 235));
$plot->mark->setSize(15);
$plot->mark->setFill(new RadialGradient(new LightGreen(), new DarkGreen()));
$plot->link(TRUE);
$plot->setColor(new DarkGreen());
$plot->setSpace(6, 6, 6, 0);
$plot->setPadding(25, NULL, 40, 20);
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:19,代码来源:scatter-003.php

示例2: array

    $plot->mark->setSize(make_num('prv_mark', 10));
    $plot->mark->setFill(make_color('prv_markcolor', 'F0F0F0'));
    $plot->setThickness(make_num('prv_thick', 5));
    $plot->setYAxis(PLOT_LEFT);
    $plot->setYMin($min);
    $plot->setYMax($max);
    $grp->add($plot);
}
if ($val_ytd) {
    $xkeys = array();
    foreach ($val_ytd as $k => $v) {
        $xkeys[$k] = $k + 0.5;
    }
    //for ($i=0;isset($val_ytd[$i]);$i++) $xkeys[$i]=$i+.5;
    $plot = new ScatterPlot(array_values($val_ytd), array_values($xkeys));
    $plot->link(TRUE, make_color('ytd_color', '40FFFF'));
    $plot->mark->setSize(make_num('ytd_mark', 10));
    $plot->mark->setFill(make_color('ytd_markcolor', 'F0F0F0'));
    $plot->setThickness(make_num('ytd_thick', 5));
    $plot->setYAxis(PLOT_LEFT);
    $plot->setYMin($min);
    $plot->setYMax($max);
    $grp->add($plot);
}
$grp->axis->bottom->setLabelText(array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'));
$grp->axis->left->label->setCallbackFunction('FmtAmount');
set_font($grp->axis->bottom->label, 'x_font');
set_font($grp->axis->left->label, 'y_font');
set_font($grp->axis->right->label, 'y_font');
$graph->border->hide();
$grp->setBackgroundColor(make_color('bg_color', 'FFFFFF'));
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:31,代码来源:affpulse.php

示例3: getCircle

$group->setSpace(5, 5, 5, 5);
$group->legend->setPosition(0.82, 0.1);
$group->legend->setAlign(LEGEND_CENTER, LEGEND_MIDDLE);
function getCircle($size)
{
    $center = 0;
    $x = array();
    $y = array();
    for ($i = 0; $i <= 20; $i++) {
        $rad = $i / 20 * 2 * M_PI;
        $x[] = $center + cos($rad) * $size;
        $y[] = $center + sin($rad) * $size;
    }
    return array($x, $y);
}
list($x, $y) = getCircle(3);
$plot = new ScatterPlot($y, $x);
$plot->link(TRUE, new DarkBlue());
$plot->mark->setFill(new DarkPink());
$plot->mark->setType(MARK_CIRCLE, 6);
$group->legend->add($plot, 'Circle #1', LEGEND_MARK);
$group->add($plot);
list($x, $y) = getCircle(5);
$plot = new ScatterPlot($y, $x);
$plot->link(TRUE, new DarkGreen());
$plot->mark->setFill(new DarkOrange());
$plot->mark->setType(MARK_SQUARE, 4);
$group->legend->add($plot, 'Circle #2', LEGEND_MARK);
$group->add($plot);
$graph->add($group);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:31,代码来源:scatter-001.php

示例4: Graph

<?php

require_once "../ScatterPlot.class.php";
$graph = new Graph(400, 400);
$graph->title->set('Linked ScatterPlot');
$y = array(1, 10, 3, -4, 1, 4, 8, 7);
$x = array(0.5, 0.5, 3, 5, 2, 3, 4, 1.5);
$plot = new ScatterPlot($y, $x);
$plot->setBackgroundColor(new VeryLightGray());
$plot->setPadding(NULL, NULL, 40, 20);
$plot->link(TRUE, new DarkBlue());
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:13,代码来源:scatter-002.php


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