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


PHP ScatterPlot::SetColor方法代码示例

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


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

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

示例2: print_graph


//.........这里部分代码省略.........
    }
    if (count($data) > 0 && $type) {
        $figure_file = "graph_cache/" . rand(11111, 999999999) . "." . $img_type;
        if ($bandw) {
            $colours = array('snow1', 'black', 'snow4', 'snow3', 'snow2', 'cadetblue4', 'cadetblue3', 'cadetblue1', 'bisque4', 'bisque2', 'beige');
        } else {
            $colours = array('cyan', 'darkorchid4', 'cadetblue3', 'khaki1', 'darkolivegreen2', 'cadetblue4', 'coral', 'cyan4', 'rosybrown3', 'wheat1');
        }
        $fills = array('navy', 'orange', 'red', 'yellow', 'purple', 'navy', 'orange', 'red', 'yellow', 'purple');
        $patterns = array(PATTERN_DIAG1, PATTERN_CROSS1, PATTERN_STRIPE1, PATTERN_DIAG3, PATTERN_CROSS2, PATTERN_DIAG2, PATTERN_DIAG4, PATTERN_CROSS3, PATTERN_CROSS4, PATTERN_STRIPE1);
        $markers = array(MARK_DIAMOND, MARK_SQUARE, MARK_CIRCLE, MARK_UTRIANGLE, MARK_DTRIANGLE, MARK_FILLEDCIRCLE, MARK_CROSS, MARK_STAR, MARK_X);
        // LEGENDS
        if ($type == 'pie' || $type == 'pie3d') {
            $graph = new PieGraph($w * $k, $h * $k);
        } else {
            if ($type == 'radar') {
                $graph = new RadarGraph($w * $k, $h * $k);
            } else {
                $graph = new Graph($w * $k, $h * $k);
            }
        }
        // mPDF 4.5.009
        //	$graph->img->SetImgFormat($img_type) ;
        //	if (strtoupper($img_type)=='JPEG') { $graph->img->SetQuality(90); }
        if ($antialias) {
            $graph->img->SetAntiAliasing();
        }
        $graph->SetShadow(true, 2 * $k);
        $graph->SetMarginColor("white");
        // TITLE
        $graph->title->Set($title);
        $graph->title->SetMargin(10 * $k);
        $graph->title->SetFont(FF_USERFONT, FS_BOLD, 11 * $k);
        $graph->title->SetColor("black");
        $graph->legend->SetLineSpacing(3 * $k);
        $graph->legend->SetMarkAbsSize(6 * $k);
        $graph->legend->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
        // Set GRAPH IMAGE MARGINS
        if ($type == 'pie' || $type == 'pie3d') {
            $psize = 0.3;
            $pposxabs = $w / 2;
            $pposy = 0.55;
            if ($longestlegend) {
                // if legend showing
                $pposxabs -= ($longestlegend * 5 + 20) / 2;
            }
            $pposx = $pposxabs / $w;
            $graph->legend->Pos(0.02, 0.5, 'right', 'center');
        } else {
            if ($type == 'radar') {
                $psize = 0.5;
                $pposxabs = $w / 2;
                $pposy = 0.55;
                if ($longestlabel) {
                    // if legend showing
                    $pposxabs -= ($longestlabel * 5 + 20) / 2;
                }
                $pposx = $pposxabs / $w;
                $graph->legend->Pos(0.02, 0.5, 'right', 'center');
            } else {
                if ($type == 'xy' || $type == 'scatter') {
                    $pml = 50;
                    $pmr = 20;
                    $pmt = 60;
                    $pmb = 50;
                    $xaxislblmargin = $pmb - 30;
开发者ID:BozzaCoon,项目名称:SPHERE-Framework,代码行数:67,代码来源:graph.php

示例3: cos

// content="text/plain; charset=utf-8"
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\Graph(350, 230);
$graph->SetScale('linlin');
$graph->SetShadow();
$graph->SetAxisStyle(AXSTYLE_BOXOUT);
$graph->img->SetMargin(50, 50, 60, 40);
$graph->title->Set('Linked scatter plot');
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$graph->subtitle->Set('(BOXOUT Axis style)');
$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL);
// 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->mark->SetWidth(4);
$sp1->link->Show();
$sp1->link->SetStyle('dotted');
$graph->Add($sp1);
$graph->Stroke();
开发者ID:amenadiel,项目名称:jpgraph,代码行数:31,代码来源:scatterlinkex3.php

示例4: Graph

    }
    //===========
    $graph = new Graph(750, 450);
    $graph->img->SetMargin(40, 40, 40, 80);
    $graph->img->SetAntiAliasing();
    $graph->SetScale("textlin");
    $graph->SetShadow();
    $graph->title->Set(strtoupper($pabrik) . "  FFA " . $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('CPO');
    $p2->SetLegend('Kernel');
    $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));
    $graph->Stroke();
}
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:pabrik_slave_grafikProduksiFfa.php


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