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


PHP LinePlot::AddArea方法代码示例

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


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

示例1: array

include "../jpgraph.php";
include "../jpgraph_line.php";
// Some data
$ydata = array(5, 10, 15, 20, 15, 10, 8, 7, 4, 10, 5);
// Create the graph
$graph = new Graph(400, 300, "auto");
$graph->SetScale("textlin");
$graph->SetShadow(true);
$graph->SetMarginColor("lightblue");
// Setup format for legend
$graph->legend->SetFillColor("antiquewhite");
$graph->legend->SetShadow(true);
// Setup title
$graph->title->Set("Filled Area Example");
$graph->title->SetFont(FF_FONT2, FS_BOLD);
// Setup semi-filled line plot
$lineplot = new LinePlot($ydata);
$lineplot->SetLegend("Semi-filled\nLineplot");
// Set line color
$lineplot->SetColor("black");
// Setup the two areas to be filled
$lineplot->AddArea(2, 5, LP_AREA_FILLED, "red");
$lineplot->AddArea(6, 8, LP_AREA_FILLED, "green");
// Display the marks on the lines
$lineplot->mark->SetType(MARK_DIAMOND);
$lineplot->mark->SetSize(8);
$lineplot->mark->Show();
// add plot to the graph
$graph->Add($lineplot);
// display graph
$graph->Stroke();
开发者ID:tavo1981,项目名称:phpbar,代码行数:31,代码来源:partiallyfilledlineex1.php

示例2: NetworkTable

pg_close($coop);
include "../../../include/jpgraph/jpgraph.php";
include "../../../include/jpgraph/jpgraph_bar.php";
include "../../../include/jpgraph/jpgraph_line.php";
include "../../../include/network.php";
$nt = new NetworkTable("IACLIMATE");
$cities = $nt->table;
$graph = new Graph(600, 400, "example1");
$graph->SetScale("textlin", 0, 100);
$graph->img->SetMargin(40, 5, 35, 60);
$graph->xaxis->SetTickLabels($xdata);
$graph->xaxis->SetTextTickInterval(100);
$graph->xaxis->SetLabelAngle(90);
$graph->xaxis->SetTitle("Precip [inches]");
$graph->xaxis->SetTitleMargin(30);
$graph->yaxis->SetTitle("Cumulative Distribution (percent)");
$graph->title->Set($cities[$station]['name'] . " Precip Accumulation Probabilities");
$graph->subtitle->Set($subtitle);
$l1 = new LinePlot($ydata);
$l1->SetColor("blue");
$l1->SetWeight(2);
$l1->AddArea($hm, $hm, LP_AREA_FILLED, "lightred");
$l1->AddArea($h95, $h95, LP_AREA_FILLED, "lightred");
$l1->AddArea($h5, $h5, LP_AREA_FILLED, "lightred");
$txt = new Text("Diagnostics\n  Min: {$lowVal} ({$lowYear})\n  95%: " . ($lowVal + $h95 * 0.01) . "\n~Mean: " . ($lowVal + $hm * 0.01) . "\n   SD: {$stddev}\n   5%: " . ($lowVal + $h5 * 0.01) . "\n  Max: {$hiVal} ({$hiYear})\n");
$txt->SetPos(0.71, 0.128);
$txt->SetFont(FF_FONT1, FS_NORMAL);
$txt->SetColor("blue");
$graph->Add($l1);
$graph->Add($txt);
$graph->Stroke();
开发者ID:raprasad,项目名称:iem,代码行数:31,代码来源:precip_cdf.php

示例3: LinePlot

*/
$l1 = new LinePlot($y1);
$l1->SetColor("red");
$l1->SetWeight(2);
$l1->SetLegend("High Temp");
$l1->SetStyle('dashed');
$l2 = new LinePlot($y2);
$l2->SetColor("blue");
$l2->SetWeight(2);
$l2->SetLegend("Low Temp");
$l2->SetStyle('dashed');
$lp1 = new LinePlot($cy1);
$lp1->SetColor("red");
$lp1->SetLegend("CDF (high temp)");
$lp1->AddArea($h5, $h95, LP_AREA_NOT_FILLED, "lightred");
$lp1->AddArea($hm, $hm, LP_AREA_FILLED, "lightred");
$lp1->SetWeight(2);
$lp2 = new LinePlot($cy2);
$lp2->SetColor("blue");
$lp2->SetLegend("CDF (low temp)");
$lp2->AddArea($l5, $l95, LP_AREA_NOT_FILLED, "lightblue");
$lp2->AddArea($lm, $lm, LP_AREA_FILLED, "lightblue");
$lp2->SetWeight(2);
// Add the plot to the graph
//$graph->Add($gbplot);
$graph->AddY2($l1);
$graph->AddY2($l2);
$graph->Add($lp1);
$graph->Add($lp2);
// Display the graph
$graph->Stroke();
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:gspread.php


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