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


PHP ScatterPlot::SetLinkPoints方法代码示例

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


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

示例1: array

<?php

// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_scatter.php';
$datax = array(3.5, 3.7, 3, 4, 6.2, 6, 3.5, 8, 14, 8, 11.1, 13.7);
$datay = array(20, 22, 12, 13, 17, 20, 16, 19, 30, 31, 40, 43);
$graph = new Graph(300, 200);
$graph->img->SetMargin(40, 40, 40, 40);
$graph->img->SetAntiAliasing();
$graph->SetScale("linlin");
$graph->SetShadow();
$graph->title->Set("Linked Scatter plot ex1");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$sp1 = new ScatterPlot($datay, $datax);
$sp1->SetLinkPoints(true, "red", 2);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("navy");
$sp1->mark->SetWidth(3);
$graph->Add($sp1);
$graph->Stroke();
?>


开发者ID:trabisdementia,项目名称:xuups,代码行数:22,代码来源:scatterlinkex1.php

示例2: _renderPlotScatter

 private function _renderPlotScatter($groupID, $bubble)
 {
     $grouping = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping();
     $scatterStyle = $bubbleSize = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle();
     $seriesCount = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();
     $seriesPlots = array();
     //	Loop through each data series in turn
     for ($i = 0; $i < $seriesCount; ++$i) {
         $dataValuesY = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues();
         $dataValuesX = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues();
         foreach ($dataValuesY as $k => $dataValueY) {
             $dataValuesY[$k] = $k;
         }
         $seriesPlot = new ScatterPlot($dataValuesX, $dataValuesY);
         if ($scatterStyle == 'lineMarker') {
             $seriesPlot->SetLinkPoints();
             $seriesPlot->link->SetColor(self::$_colourSet[self::$_plotColour]);
         } elseif ($scatterStyle == 'smoothMarker') {
             $spline = new Spline($dataValuesY, $dataValuesX);
             list($splineDataY, $splineDataX) = $spline->Get(count($dataValuesX) * self::$_width / 20);
             $lplot = new LinePlot($splineDataX, $splineDataY);
             $lplot->SetColor(self::$_colourSet[self::$_plotColour]);
             $this->_graph->Add($lplot);
         }
         if ($bubble) {
             $this->_formatPointMarker($seriesPlot, 'dot');
             $seriesPlot->mark->SetColor('black');
             $seriesPlot->mark->SetSize($bubbleSize);
         } else {
             $marker = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker();
             $this->_formatPointMarker($seriesPlot, $marker);
         }
         $dataLabel = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue();
         $seriesPlot->SetLegend($dataLabel);
         $this->_graph->Add($seriesPlot);
     }
 }
开发者ID:s-kalaus,项目名称:ekernel,代码行数:37,代码来源:jpgraph.php

示例3: cos

require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_scatter.php';
// Make a circle with a scatterplot
$steps = 16;
for ($i = 0; $i < $steps; ++$i) {
    $a = 2 * M_PI / $steps * $i;
    $datax[$i] = cos($a);
    $datay[$i] = sin($a);
}
$graph = new Graph(300, 200);
$graph->SetScale("linlin");
$graph->img->SetMargin(40, 40, 40, 40);
$graph->SetShadow();
$graph->title->Set("Linked scatter plot");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// 10% top and bottom grace
$graph->yscale->SetGrace(5, 5);
$graph->xscale->SetGrace(1, 1);
$sp1 = new ScatterPlot($datay, $datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->SetColor("blue");
//$sp1->SetWeight(3);
$sp1->mark->SetWidth(4);
$sp1->SetLinkPoints();
$graph->Add($sp1);
$graph->Stroke();
?>


开发者ID:hcvcastro,项目名称:pxp,代码行数:28,代码来源:scatterlinkex2.php


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