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


PHP BarPlot::SetAbsWidth方法代码示例

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


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

示例1: LinePlot

// Use built in font
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// Make the margin around the plot a little bit bigger
// then default
$graph->img->SetMargin(40, 140, 40, 80);
// Slightly adjust the legend from it's default position in the
// top right corner to middle right side
$graph->legend->Pos(0.05, 0.5, "right", "center");
// Display every 10:th datalabel
$graph->xaxis->SetTextTickInterval(6);
$graph->xaxis->SetTextLabelInterval(2);
$graph->xaxis->SetTickLabels($databarx);
$graph->xaxis->SetLabelAngle(90);
// Create a red line plot
$p1 = new LinePlot($datay);
$p1->SetColor("red");
$p1->SetLegend("Pressure");
// Create the bar plot
$b1 = new BarPlot($databary);
$b1->SetLegend("Temperature");
$b1->SetAbsWidth(6);
$b1->SetShadow();
// The order the plots are added determines who's ontop
$graph->Add($p1);
$graph->Add($b1);
// Finally output the  image
$graph->Stroke();
?>


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

示例2: getBarPlot

 function getBarPlot($data, $color)
 {
     $b = new BarPlot($data);
     //parameters hard coded for the moment
     $b->SetAbsWidth(10);
     $b->value->Show(true);
     $b->value->SetColor($this->graph->getMainColor());
     $b->value->SetFormat("%d");
     $b->value->HideZero();
     $b->value->SetMargin(4);
     $b->value->SetFont($this->graph->getFont(), FS_NORMAL, 7);
     $b->SetWidth(0.4);
     $b->SetColor($color . ':0.7');
     $b->SetFillColor($color);
     // end hard coded parameter
     return $b;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:17,代码来源:GraphOnTrackers_Engine_Bar.class.php

示例3: LinePlot

$graph->img->SetMargin(40, 140, 40, 80);
// Slightly adjust the legend from it's default position in the
// top right corner to middle right side
$graph->legend->Pos(0.03, 0.5, "right", "center");
// Display every 6:th tickmark
$graph->xaxis->SetTextTickInterval(6);
// Label every 2:nd tick mark
$graph->xaxis->SetTextLabelInterval(2);
// Setup the labels
$graph->xaxis->SetTickLabels($databarx);
$graph->xaxis->SetLabelAngle(90);
// Create a red line plot
$p1 = new LinePlot($datay);
$p1->SetColor("red");
$p1->SetLegend("Pressure");
// Create the bar plot
$b1 = new BarPlot($databary);
$b1->SetLegend("Temperature");
$b1->SetFillColor("orange");
$b1->SetAbsWidth(8);
// Drop shadow on bars adjust the default values a little bit
$b1->SetShadow("steelblue", 2, 2);
// The order the plots are added determines who's ontop
$graph->Add($p1);
$graph->AddY2($b1);
// Finally output the  image
$graph->Stroke();
?>


开发者ID:bantudevelopment,项目名称:polysmis,代码行数:28,代码来源:bartutex12.php

示例4: Graph

    if ($i % 10 == 0) {
        $databarx[] = $i;
        $databary[] = $datay[$i] / 2;
    }
}
// New graph with a background image and drop shadow
$graph = new Graph(450, 300);
$graph->img->SetMargin(40, 180, 40, 40);
$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_FILLFRAME);
//$graph->img->SetAntiAliasing();
$graph->SetScale("intlin");
$graph->SetShadow();
$graph->title->Set("Combined bar and line plot");
$graph->subtitle->Set("(\"center\" aligned bars)");
// Use built in font
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// Slightly adjust the legend from it's default position in the
// top right corner.
$graph->legend->Pos(0.05, 0.5, "right", "center");
// Create the first line
$p1 = new LinePlot($datay, $datax);
$p1->SetWeight(1);
$p1->SetColor("red");
$p1->SetLegend("Triumph Tiger -98");
$graph->Add($p1);
$b1 = new BarPlot($databary, $databarx);
$b1->SetAbsWidth(10);
$b1->SetAlign("center");
$b1->SetShadow();
$graph->Add($b1);
$graph->Stroke();
开发者ID:hcvcastro,项目名称:pxp,代码行数:31,代码来源:linebarex3.php

示例5: Graph

 // Setup graph
 $graph = new Graph($width, 250, "auto");
 $graph->SetFrame(false);
 $graph->SetScale('textlin', $options['graph_y_min'], $options['graph_y_max'], $options['graph_x_min'], $options['graph_x_max']);
 $graph->yaxis->scale->SetGrace($options['graph_y_top'], $options['graph_y_bot']);
 $graph->xaxis->scale->SetGrace($options['graph_x_top'], $options['graph_x_bot']);
 $graph->SetMarginColor($background);
 $graph->img->SetMargin(40, 30, 20, 40);
 //$graph->SetShadow();
 // Setup graph title
 $graph->title->Set($data['title']);
 $graph->title->SetFont(FF_FONT1, FS_BOLD);
 $plot = new BarPlot($data['values']);
 $plot->SetWidth(0.6);
 // set bars width in percentage
 $plot->SetAbsWidth(20);
 // set bars width in pixels
 $color = $options['graph_color'];
 // One plain color
 if ($options['graph_gradient'] == 0) {
     $plot->SetFillColor($color);
     // Gradient color
 } elseif ($options['graph_gradient'] != 0) {
     // Made the color $degree darker
     // Given color "#FF1E1E", we split the color into groups
     // (red, gree, blue): "FF", "1E" and "1E" and convert them to decimal.
     // Then sum to each group $degree and transform the result back to hex.
     $degree = -75;
     $color2 = '';
     for ($x = 1; $x < 6; $x += 2) {
         $dec = hexdec($color[$x] . $color[$x + 1]);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:custom_graph.php

示例6: LinePlot

$lineplot5->SetColor("black");
$lineplot5->SetWeight(3);
// Create the linear plot
$lineplot6 = new LinePlot($Atmpf, $times);
$lineplot6->SetLegend("Air Temperature");
$lineplot6->SetColor("red");
$lineplot6->SetWeight(3);
// Create the linear plot
$lineplot7 = new LinePlot($Adwpf, $times);
$lineplot7->SetLegend("Dew Point");
$lineplot7->SetColor("green");
$lineplot7->SetWeight(3);
$bp1 = new BarPlot($pcpn, $times);
$bp1->SetLegend("Precip");
$bp1->SetFillColor("black");
$bp1->SetAbsWidth(1.0);
// Create the linear plot
$fz = new LinePlot($freezing, $times);
$fz->SetColor("blue");
// Title Box
$tx1 = new Text($cities[$station]['name'] . " \nMeteogram ");
$tx1->SetPos(0.01, 0.01, 'left', 'top');
$tx1->SetFont(FF_FONT1, FS_BOLD, 16);
$tx2 = new Text("Time series showing temperatures\n   from the pavement sensors and \n   the sub-surface sensor ");
$tx2->SetPos(0.01, 0.11, 'left', 'top');
$tx2->SetFont(FF_FONT1, FS_NORMAL, 10);
include "{$rootpath}/include/mlib.php";
$mySOb = array();
if ($mode == "hist") {
    $ptext = "Historical Plot for dates:\n";
    $tx3 = new Text($ptext . $plotTitle);
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:SFtemps.php

示例7: GerarGraficoBarra

 function GerarGraficoBarra()
 {
     require_once "../biblioteca/jpgraph/jpgraph.php";
     require_once "../biblioteca/jpgraph/jpgraph_bar.php";
     $grafico = new graph($this->largura, $this->altura, "png");
     /* Margem das partes principais do gráfico (dados), o que está
      * fora da margem fica separado para as labels, títulos, etc
      * Este valor ficará como padrão para todos os gráficos
      */
     $grafico->img->SetMargin(40, 30, 20, 40);
     $grafico->SetScale("textlin");
     $grafico->SetShadow();
     //Define Titulo e Subtitulo
     $grafico->title->Set($this->titulo);
     $grafico->subtitle->Set($this->subtitulo);
     // pedir para mostrar os grides no fundo do gráfico,
     // o ygrid é marcado como true por padrão
     $grafico->ygrid->Show(true);
     $grafico->xgrid->Show(true);
     $gBarras = new BarPlot($this->dados_eixoY);
     $gBarras->SetFillColor($this->cor_barra);
     $gBarras->SetShadow($this->cor_sombra);
     $gBarras->SetAbsWidth($this->largura_barra);
     $gBarras->value->Show();
     $gBarras->value->SetFormat('%d');
     $gBarras->SetValuePos('center');
     $gBarras->value->SetFont(FF_FONT1, FS_BOLD);
     // título dos vértices
     $grafico->yaxis->title->Set($this->label_eixoY);
     $grafico->xaxis->title->Set($this->label_eixoX);
     // título das barras
     $grafico->xaxis->SetTickLabels($this->dados_eixoX);
     $grafico->Add($gBarras);
     $grafico->Stroke("imagens/graficos/" . $this->nome);
 }
开发者ID:silloty,项目名称:vox,代码行数:35,代码来源:grafico.gti.php

示例8: getChart

function getChart($exec_arr, $auto_arr, $user_arr, $testplan_name)
{
    $data1y = $exec_arr;
    $data2y = $auto_arr;
    // Create the graph. These two calls are always required
    $graph = new Graph(1500, 300, 'auto');
    $graph->SetScale("textlin");
    $theme_class = new UniversalTheme();
    $graph->SetTheme($theme_class);
    $graph->yaxis->SetTickPositions(array(20, 40, 60, 80, 100), array(10, 30, 50, 70, 90));
    $graph->SetBox(false);
    $graph->ygrid->SetFill(false);
    $graph->xaxis->SetTickLabels($user_arr);
    $graph->yaxis->HideLine(false);
    $graph->yaxis->HideTicks(false, false);
    // Create the bar plots
    $b1plot = new BarPlot($data1y);
    $b2plot = new BarPlot($data2y);
    // Create the grouped bar plot
    $gbplot = new GroupBarPlot(array($b1plot, $b2plot));
    $gbplot->SetWidth(0.3);
    // ...and add it to the graPH
    $graph->Add($gbplot);
    $b1plot->SetColor("white");
    $b1plot->SetFillColor("red");
    $b1plot->SetAbsWidth(10);
    $b1plot->SetLegend("Executed");
    $b2plot->SetColor("white");
    $b2plot->SetFillColor("green");
    $b2plot->SetAbsWidth(10);
    $b2plot->SetLegend("Automated");
    $graph->title->Set("Execution Status of {$testplan_name}");
    $graph->yaxis->title->Set("value in %");
    // Display the graph
    //$graph->Stroke();
    $graph->img->SetImgFormat('jpeg');
    $fileName = "execution.jpeg";
    $graph->Stroke($fileName);
    return $fileName;
}
开发者ID:window98lsq,项目名称:center,代码行数:40,代码来源:testplan.php


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