本文整理汇总了PHP中ScatterPlot类的典型用法代码示例。如果您正苦于以下问题:PHP ScatterPlot类的具体用法?PHP ScatterPlot怎么用?PHP ScatterPlot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ScatterPlot类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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
示例2: Graph
<?php
require_once "../ScatterPlot.class.php";
$graph = new Graph(400, 400);
$graph->shadow->setSize(5);
$graph->title->set('ScatterPlot with values');
$y = array(4, 3, 2, 5, 8, 1, 3, 6, 4, 5);
$x = array(1, 2, 5, 4, 3, 6, 2, 4, 5, 1);
$plot = new ScatterPlot($y, $x);
$plot->setSpace(6, 6, 6, 0);
$plot->setPadding(NULL, NULL, 40, 20);
// Set dashed lines on the grid
$plot->grid->setType(LINE_DASHED);
$plot->mark->setSize(30);
$plot->mark->setFill(new DarkOrange(20));
$plot->label->set($y);
$plot->label->setColor(new White());
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:19,代码来源:scatter-003.php
示例3: _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
示例4: 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
示例5: LinearRegression
$lr = new LinearRegression($datax, $datay);
list($stderr, $corr) = $lr->GetStat();
list($xd, $yd) = $lr->GetY(0, 19);
// Create the graph
$graph = new Graph\Graph(300, 250);
$graph->SetScale('linlin');
// Setup title
$graph->title->Set("Linear regression");
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14);
$graph->subtitle->Set('(stderr=' . sprintf('%.2f', $stderr) . ', corr=' . sprintf('%.2f', $corr) . ')');
$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 12);
// make sure that the X-axis is always at the
// bottom at the plot and not just at Y=0 which is
// the default position
$graph->xaxis->SetPos('min');
// Create the scatter plot with some nice colors
$sp1 = new ScatterPlot($datay, $datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->SetColor("blue");
$sp1->SetWeight(3);
$sp1->mark->SetWidth(4);
// Create the regression line
$lplot = new Plot\LinePlot($yd);
$lplot->SetWeight(2);
$lplot->SetColor('navy');
// Add the pltos to the line
$graph->Add($sp1);
$graph->Add($lplot);
// ... and stroke
$graph->Stroke();
开发者ID:amenadiel,项目名称:jpgraph,代码行数:31,代码来源:example16.6.php
示例6: array
<?php
// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_scatter.php';
$datay = array(20, 22, 12, 13, 17, 20, 16, 19, 30, 31, 40, 43);
$graph = new Graph(300, 200);
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->img->SetMargin(40, 40, 40, 40);
$graph->title->Set("Simple mpuls plot");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$sp1 = new ScatterPlot($datay);
$sp1->mark->SetType(MARK_SQUARE);
$sp1->SetImpuls();
$graph->Add($sp1);
$graph->Stroke();
开发者ID:hcvcastro,项目名称:pxp,代码行数:17,代码来源:impulsex1.php
示例7: array
$c = "red";
}
return array(floor($aVal / 3), "", $c);
}
// Setup a basic graph
$graph = new Graph(400, 300, 'auto');
$graph->SetScale("linlin");
$graph->img->SetMargin(40, 100, 40, 40);
$graph->SetShadow();
$graph->title->Set("Example of ballon scatter plot");
// Use a lot of grace to get large scales
$graph->yaxis->scale->SetGrace(50, 10);
// Make sure X-axis as at the bottom of the graph
$graph->xaxis->SetPos('min');
// Create the scatter plot
$sp1 = new ScatterPlot($datay, $datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
// Uncomment the following two lines to display the values
$sp1->value->Show();
$sp1->value->SetFont(FF_FONT1, FS_BOLD);
// Specify the callback
$sp1->mark->SetCallback("FCallback");
// Setup the legend for plot
$sp1->SetLegend('Year 2002');
// Add the scatter plot to the graph
$graph->Add($sp1);
// ... and send to browser
$graph->Stroke();
?>
开发者ID:nourchene-benslimane,项目名称:rth_backup,代码行数:29,代码来源:balloonex1.php
示例8: addPlot
/**
* add plot to graph
* @param string $pType plot types self::PT_*
* @param array $pOptions plot options
* @param boolean $pAdd if false, return plot instead of adding to graph
* @return object plot, if not rendered directly
*/
public function addPlot($pType = self::PT_LINE, $pOptions = array(), $pAdd = true)
{
$file = self::$JPGRAPH_DIR . \DIRECTORY_SEPARATOR . self::$GRAPH_FILES[self::$GRAPH_TYPES[$pType]];
if (\file_exists($file)) {
require_once $file;
}
if (!(count($this->dataX) > 0)) {
$this->dataX = false;
}
switch ($pType) {
case self::PT_LINE:
$plot = new \LinePlot($this->dataY, $this->dataX);
break;
case self::PT_AREA:
$plot = new \LinePlot($this->dataY, $this->dataX);
if (\array_key_exists('color', $pOptions)) {
$plot->SetFillColor($pOptions['color']);
}
break;
case self::PT_BAR:
$plot = new \BarPlot($this->dataY, $this->dataX);
break;
case self::PT_ERROR:
$plot = new \ErrorPlot($this->dataY, $this->dataY);
break;
case self::PT_FIELD:
$plot = new \FieldPlot($this->dataY, $this->dataX);
break;
case self::PT_STOCK:
$plot = new \StockPlot($this->dataY, $this->dataX);
break;
case self::PT_SCATTER:
$plot = new \ScatterPlot($this->dataY, $this->dataX);
break;
case self::PT_BALLOON:
$plot = new \ScatterPlot($this->dataY, $this->dataX);
break;
case self::PT_IMPULS:
$plot = new \ScatterPlot($this->dataY, $this->dataX);
$plot->SetImpuls();
break;
case self::PT_PIE:
$this->graph = new \PieGraph(self::$WIDTH, self::$HEIGHT);
$plot = new \PiePlot($this->data);
break;
}
if ($pAdd) {
$this->plots[] = $plot;
$this->graph->Add($plot);
} else {
return $plot;
}
}
开发者ID:Broncko,项目名称:Savant,代码行数:60,代码来源:CJpGraph.php
示例9: array
$graph->Add($sp);
if (count($rv)) {
if (isset($rvMedianValue)) {
$datax = array();
$datay = array();
foreach ($rv as $x => $y) {
$datax[] = $x;
$datay[] = $rvMedianValue;
}
$lp = new LinePlot($datay, $datax);
$lp->SetColor('red');
$lp->SetWeight(1);
$graph->Add($lp);
}
$datax = array();
$datay = array();
foreach ($rv as $x => $y) {
$datax[] = $x;
$datay[] = $y;
}
$sp = new ScatterPlot($datay, $datax);
$sp->mark->SetFillColor('red');
$sp->SetLegend('Repeat View');
$graph->Add($sp);
}
}
if (isset($graph)) {
$graph->Stroke();
} else {
header("HTTP/1.0 404 Not Found");
}
开发者ID:Pankajchandan,项目名称:WPT-server,代码行数:31,代码来源:page_metric.php
示例10: Graph
<?php
/*
* 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 "../../ScatterPlot.class.php";
$graph = new Graph(300, 300);
$graph->title->set('One value!');
$y = array(mt_rand(-42, 42));
$plot = new ScatterPlot($y);
$plot->setPadding(NULL, NULL, 40, 20);
// Set dashed lines on the grid
$plot->grid->setType(LINE_DASHED);
$plot->mark->setSize(mt_rand(0, 60));
$plot->mark->setFill(new Black(mt_rand(0, 50)));
$plot->label->set($y);
$plot->label->setColor(new White());
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:23,代码来源:ScatterPlot-1.test.php
示例11: 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
示例12: Graph
<?php
require_once "../ScatterPlot.class.php";
$graph = new Graph(400, 400);
$center = 5;
$x = array();
$y = array();
for ($i = 0; $i <= 30; $i++) {
$rad = $i / 30 * 2 * M_PI;
$x[] = $center + cos($rad) * $center;
$y[] = $center + sin($rad) * $center;
}
$plot = new ScatterPlot($y, $x);
$plot->setBackgroundColor(new VeryLightGray());
$plot->setPadding(30, 30, 30, 30);
$plot->setSpace(5, 5, 5, 5);
$plot->link(TRUE, new DarkGreen());
$plot->mark->setFill(new DarkOrange());
$plot->mark->setType(MARK_SQUARE, 4);
$plot->setXAxis(PLOT_BOTH);
$plot->setXAxisZero(FALSE);
$plot->setYAxis(PLOT_BOTH);
$plot->legend->add($plot, 'A circle', LEGEND_MARK);
$plot->legend->setPosition(0.5, 0.5);
$plot->legend->setAlign(LEGEND_CENTER, LEGEND_MIDDLE);
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:27,代码来源:scatter-006.php
示例13: Graph
$datay2[$x] = 0;
}
}
//===========
$graph = new Graph(750, 450);
$graph->img->SetMargin(70, 40, 40, 80);
$graph->img->SetAntiAliasing();
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->title->Set(strtoupper($pabrik) . " Tbs Diolah dan Sisa " . $periode);
$graph->title->SetFont(FF_DEFAULT, FS_NORMAL, 14);
$graph->xaxis->SetFont(FF_DEFAULT, FS_NORMAL, 11);
$graph->xaxis->SetTickLabels($labels);
$graph->xaxis->SetLabelAngle(45);
$p1 = new ScatterPlot($datay1);
$p2 = new ScatterPlot($datay2);
$p1->SetLegend('Diolah');
$p2->SetLegend('Sisa');
$graph->legend->Pos(0.02, 0.03);
$p1->mark->SetType(MARK_SQUARE);
$p1->SetImpuls();
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$p1->SetColor("blue");
$p2->mark->SetType(MARK_FILLEDCIRCLE);
$p2->SetImpuls();
$p2->mark->SetFillColor("orange");
$p2->mark->SetWidth(4);
$p2->SetColor("black");
$p1->SetCenter();
$graph->Add(array($p1, $p2));
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:pabrik_slave_grafikTbs.php
示例14: Graph
<?php
require_once "../ScatterPlot.class.php";
$graph = new Graph(400, 400);
$graph->shadow->setSize(5);
$y = array();
for ($i = 0; $i < 60; $i++) {
$y[] = cos($i / 30 * 2 * M_PI);
}
$plot = new ScatterPlot($y);
$plot->setSpace(6, 6);
// Set impulses
$plot->setImpulse(new DarkGreen());
$plot->grid->hideVertical();
// Hide axis labels and ticks
$plot->xAxis->label->hide();
$plot->xAxis->hideTicks();
$plot->mark->setType(MARK_SQUARE);
$plot->mark->setSize(4);
$graph->add($plot);
$graph->draw();
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:21,代码来源:scatter-004.php
示例15: 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
示例16: make_color
$plot->link(TRUE, make_color('prv_color', '40FFFF'));
$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();
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:31,代码来源:affpulse.php
示例17: 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
示例18: 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
示例19: print_graph
//.........这里部分代码省略.........
// Setup X-axis labels
$graph->xaxis->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
// mPDF 2.5 Corrects labelling of x-axis
// $graph->xaxis->SetTickLabels($legends);
$graph->xaxis->SetLabelAngle(50);
$graph->xaxis->SetLabelMargin(4 * $k);
// X-axis title
if ($labels[0]) {
$graph->xaxis->title->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
$graph->xaxis->SetTitleMargin($xaxislblmargin * $k);
$graph->xaxis->SetTitle($labels[0], 'middle');
}
// Create the bar plot
// SPLINES
if ($splines && $type == 'xy') {
$spline = new Spline($data[0], $data[1]);
list($newx, $newy) = $spline->Get(100);
} else {
$newx = $data[0];
$newy = $data[1];
}
if ($type == 'xy') {
// LINE PLOT
$bplot = new LinePlot($newy, $newx);
// Set color for each line
$bplot->SetColor($fills[0]);
$bplot->SetWeight(4 * $k);
if ($bandw) {
$bplot->SetShadow("gray5");
}
$graph->Add($bplot);
}
// SCATTER PLOT
$cplot = new ScatterPlot($data[1], $data[0]);
$cplot->mark->SetType($markers[0]);
$cplot->mark->SetFillColor($fills[0]);
$cplot->mark->SetWidth(8 * $k);
if ($show_values) {
// mPDF 2.5
if ($type == 'xy') {
$cplot->value->Show();
}
// Not if scatter
$cplot->value->SetMargin(8 * $k);
$cplot->value->SetColor("darkred");
$cplot->value->SetFont(FF_USERFONT, FS_NORMAL, 6 * $k);
if ($percent || $show_percent) {
$cplot->value->SetFormat('%d%%');
} else {
$cplot->value->SetFormat("%s");
}
}
// Set color for each line
$cplot->SetColor($fills[0]);
$cplot->SetWeight(4 * $k);
if ($bandw) {
$cplot->SetShadow("gray5");
}
$graph->Add($cplot);
} else {
if ($type == 'bar') {
// Setup the graph.
$graph->img->SetMargin($pml * $k, $pmr * $k, $pmt * $k, $pmb * $k);
// LRTB
$graph->SetScale($axes);
// Setup y-axis
开发者ID:BozzaCoon,项目名称:SPHERE-Framework,代码行数:67,代码来源:graph.php
示例20: PlotLine
// Set legend box specification
$graph->legend->SetFillColor("white");
$graph->legend->SetLineWeight(2);
// Set X-axis at the minimum value of Y-axis (default will be at 0)
$graph->xaxis->SetPos("min");
// "min" will position the x-axis at the minimum value of the Y-axis
// Extend the margin for the labels on the Y-axis and reverse the direction
// of the ticks on the Y-axis
$graph->yaxis->SetLabelMargin(12);
$graph->xaxis->SetLabelMargin(6);
$graph->yaxis->SetTickSide(SIDE_LEFT);
$graph->xaxis->SetTickSide(SIDE_DOWN);
// Add mark graph with static lines
$line = new PlotLine(HORIZONTAL, 0, "black", 2);
$graph->AddLine($line);
// Create a new impuls type scatter plot
$sp1 = new ScatterPlot($datay, $datax);
$sp1->mark->SetType(MARK_SQUARE);
$sp1->mark->SetFillColor("red");
$sp1->mark->SetWidth(3);
$sp1->SetImpuls();
$sp1->SetColor("blue");
$sp1->SetWeight(1);
$sp1->SetLegend("Non-causal signal");
$graph->Add($sp1);
// Create the envelope plot
$ep1 = new LinePlot($datayenv, $datax);
$ep1->SetStyle("dotted");
$ep1->SetLegend("Positive envelope");
$graph->Add($ep1);
$graph->Stroke();
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:impulsex4.php
注:本文中的ScatterPlot类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论