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


PHP ScatterPlot::setBackgroundColor方法代码示例

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


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

示例1: Graph

<?php

require_once "../ScatterPlot.class.php";
$graph = new Graph(400, 400);
$graph->title->set('Simple 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->legend->add($plot, 'Some points', LEGEND_MARKONLY);
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:13,代码来源:scatter-001.php

示例2: 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

示例3: Graph

<?php

require_once "../../ScatterPlot.class.php";
$graph = new Graph(300, 240);
$graph->title->set('Simple ScatterPlot');
$graph->shadow->setSize(4);
$y = array(1, 1.3, 1.8, 1.6, 10, 7, 8, 3, 4, 2, 4);
$x = array(0.5, 0.7, 0.65, 0.9, 0.5, 1.5, 4, 3, 5, 2, 2);
$plot = new ScatterPlot($y, $x);
$plot->setBackgroundColor(new Color(255, 245, 220));
$plot->mark->setSize(15);
$plot->mark->setFill(new RadialGradient(new LightRed(), new Red()));
$plot->setSpace(6, 6, 6, 0);
$plot->setPadding(25, NULL, 40, 20);
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:16,代码来源:scatter-002.php

示例4: Graph

<?php

require_once "../../ScatterPlot.class.php";
$graph = new Graph(300, 200);
$graph->title->set('Impulses');
$graph->shadow->setSize(4);
$y = array();
for ($i = 0; $i < 40; $i++) {
    $y[] = cos($i / 15 * 2 * M_PI) / (0.8 + $i / 15) * 4;
}
$plot = new ScatterPlot($y);
$plot->setPadding(25, 15, 35, 15);
$plot->setBackgroundColor(new Color(230, 230, 255));
$plot->setSpace(2, 2);
// Set impulses
$plot->setImpulse(new DarkBlue());
$plot->grid->hideVertical();
$plot->grid->setType(LINE_DASHED);
// Hide ticks
$plot->xAxis->hideTicks();
$plot->xAxis->label->hide();
$plot->mark->setType(MARK_SQUARE);
$plot->mark->setSize(4);
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:25,代码来源:impulse-001.php

示例5: Graph

<?php

require_once "../ScatterPlot.class.php";
$graph = new Graph(400, 400);
$graph->title->set('Impulses');
$graph->title->move(0, 30);
$graph->shadow->setSize(5);
$y = array();
for ($i = 0; $i < 60; $i++) {
    $y[] = cos($i / 30 * 2 * M_PI) / (1.5 + $i / 15);
}
$plot = new ScatterPlot($y);
$plot->setBackgroundColor(new VeryLightOrange());
$plot->setSpace(5);
// Set impulses
$plot->setImpulse(new DarkBlue());
$plot->grid->hideVertical();
// Hide ticks
$plot->xAxis->hideTicks();
// Change labels interval
$plot->xAxis->label->setInterval(5);
$plot->mark->setType(MARK_SQUARE);
$plot->mark->setSize(4);
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:25,代码来源:scatter-005.php


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