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


PHP ScatterPlot::SetWeight方法代码示例

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


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

示例1: 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("Impuls plot, variant 2");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$graph->xaxis->title->Set("Impuls respons");
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
$sp1 = new ScatterPlot($datay);
//,$datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->mark->SetWidth(4);
$sp1->SetImpuls();
$sp1->SetColor("blue");
$sp1->SetWeight(3);
$graph->Add($sp1);
$graph->Stroke();
开发者ID:hcvcastro,项目名称:pxp,代码行数:24,代码来源:impulsex2.php

示例2: sprintf

{
    return sprintf("%02.2f", $l);
}
// Setup the basic parameters for the graph
$graph = new Graph(400, 200);
$graph->SetScale("intlin");
$graph->SetShadow();
$graph->SetBox();
$graph->title->Set("Impuls Example 3");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// Set format callback for labels
$graph->yaxis->SetLabelFormatCallback("mycallback");
// 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);
// Create a new impuls type scatter plot
$sp1 = new ScatterPlot($datay);
$sp1->mark->SetType(MARK_SQUARE);
$sp1->mark->SetFillColor("red");
$sp1->SetImpuls();
$sp1->SetColor("blue");
$sp1->SetWeight(1);
$sp1->mark->SetWidth(3);
$graph->Add($sp1);
$graph->Stroke();
开发者ID:hcvcastro,项目名称:pxp,代码行数:31,代码来源:impulsex3.php

示例3: print_graph


//.........这里部分代码省略.........
                    $p1->value->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
                    if ($percent) {
                        $p1->SetLabelType(PIE_VALUE_PERADJ);
                    } else {
                        $p1->SetLabelType(PIE_VALUE_ABS);
                    }
                    if ($percent || $show_percent) {
                        $p1->value->SetFormat("%d%%");
                    } else {
                        $p1->value->SetFormat("%s");
                    }
                } else {
                    $p1->value->Show(false);
                }
                $p1->SetLegends($legends);
                $p1->SetEdge();
                $p1->SetSize($psize);
                $p1->SetCenter($pposx, $pposy);
                if ($labels[0]) {
                    $graph->subtitle->Set($labels[0]);
                    $graph->subtitle->SetMargin(10 * $k);
                    $graph->subtitle->SetFont(FF_USERFONT, FS_BOLD, 11 * $k);
                    $graph->subtitle->SetColor("black");
                }
                $graph->Add($p1);
            } else {
                if ($type == 'radar') {
                    $graph->SetSize($psize);
                    $graph->SetPos($pposx, $pposy);
                    $graph->SetTitles($legends);
                    // labels each axis
                    $graph->axis->title->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
                    $graph->axis->title->SetMargin(5 * $k);
                    $graph->axis->SetWeight(1 * $k);
                    $graph->axis->HideLabels();
                    $graph->axis->SetFont(FF_USERFONT, FS_NORMAL, 6 * $k);
                    $graph->HideTickMarks();
                    $group = array();
                    foreach ($data as $series => $dat) {
                        $rdata = array();
                        foreach ($data[$series] as $row) {
                            $rdata[] = $row;
                        }
                        if (count($rdata) < 3) {
                            die("ERROR::Graph::Cannot create a Radar Plot with less than 3 data points.");
                        }
                        // Create the radar plot
                        $bplot = new RadarPlot($rdata);
                        $bplot->mark->SetType($markers[$series]);
                        $bplot->mark->SetFillColor($colours[$series]);
                        $bplot->mark->SetWidth(3 * $k);
                        $bplot->SetColor($colours[$series]);
                        if ($series == 0) {
                            $bplot->SetFillColor('lightred');
                        } else {
                            $bplot->SetFill(false);
                        }
                        $bplot->SetLineWeight(1 * $k);
                        $bplot->SetLegend($labels[$series]);
                        if ($bandw) {
                            $bplot->SetShadow("gray5");
                        }
                        $graph->Add($bplot);
                    }
                } else {
                    if ($type == 'line') {
开发者ID:BozzaCoon,项目名称:SPHERE-Framework,代码行数:67,代码来源:graph.php


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