本文整理汇总了PHP中PHPlot::SetYLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPlot::SetYLabel方法的具体用法?PHP PHPlot::SetYLabel怎么用?PHP PHPlot::SetYLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPlot
的用法示例。
在下文中一共展示了PHPlot::SetYLabel方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
//Set some data
if ($graph_type == 1) {
//text-data (no time)
$example_data = array($data_array, $data_array);
} else {
//data-data (any extra entries are time).
$example_data = array($data_array);
}
$graph->SetDataValues($example_data);
//Error_Reporting(0);
$graph->SetPlotType($graph_type_str);
$graph->SetLabelScalePosition(1.27);
$graph->SetLegend($legend_array);
if ($graph_type == 2) {
$graph->SetYLabel($element);
$graph->SetXLabel($cw['users']);
} else {
$graph->SetLegendPixels(1, 1, "");
}
//$graph->SetTitle("$element per user");
//Draw it
$graph->DrawGraph();
//list things to change on the graph
} else {
print_header($cw['graphs']);
if (isset($graph_selected) && $graph_selected == 1) {
echo sprintf($st[143], $element) . "<img src='{$_SERVER['PHP_SELF']}?graph_db={$graph_db}&draw_graph=1&graph_type={$graph_type}&remaining={$remaining}' alt='" . sprintf($st[144], $graph_type_str, $element) . "' /><br />" . $st[145] . "</center>";
} else {
$graph_selected = 0;
}
示例2: PHPlot
<?php
//Include the code
include "../phplot.php";
//Define the object and get background image 0cars.jpg
//////NOTE! THIS EXAMPLE WILL ONLY WORK IF YOU HAVE
//////JPEG SUPPORT ENABLED. (Use a different file as a background
//////if you have png or gif enabled.
$graph = new PHPlot(500, 223, "", "0cars.jpg");
//Set some data
$example_data = array(array("55", 5), array("60", 10), array("65", 20), array("70", 30), array("75", 25), array("80", 10));
$graph->SetDataValues($example_data);
//Set up some nice formatting things
$graph->SetTitle("Speed Histogram");
$graph->SetXLabel("Miles per Hour");
$graph->SetYLabel("Percent of Cars");
$graph->SetVertTickIncrement(5);
$graph->SetPlotAreaWorld(0, 0, 6, 35);
//Make the margins nice for the background image
$graph->SetMarginsPixels(80, 35, 35, 70);
//Set up some color and printing options
$graph->background_done = 1;
//The image background we get from 0cars.jpg
$graph->SetDrawPlotAreaBackground(0);
//Plot Area background we get from the image
$graph->SetDataColors(array("white"), array("black"));
//Set Output format
$graph->SetFileFormat("png");
//Draw it
$graph->DrawGraph();
示例3: PHPlot
<?php
include "./data_date2.php";
include "../phplot.php";
$graph = new PHPlot(600, 400);
$graph->SetPrintImage(0);
//Don't draw the image yet
$graph->SetDataType("data-data-error");
//Must be called before SetDataValues
$graph->SetNewPlotAreaPixels(90, 40, 540, 190);
$graph->SetDataValues($example_data);
$graph->SetXGridLabelType("time");
$graph->SetXDataLabelAngle(90);
$graph->SetXLabel("");
$graph->SetYLabel("Price");
$graph->SetVertTickIncrement(20);
$graph->SetHorizTickIncrement(2679000);
$graph->SetXTimeFormat("%b %y");
$graph->SetPlotType("lines");
$graph->SetErrorBarShape("line");
$graph->SetPointShape("halfline");
$graph->SetYScaleType("log");
$graph->SetLineWidth(1);
$graph->SetPlotAreaWorld(883634400, 1, 915095000, 140);
$graph->DrawGraph();
//Now do the second chart on the image
unset($example_data);
$graph->SetPrintImage(1);
//Now draw the image
$graph->SetYScaleType("linear");
include "./data_date.php";
示例4: PHPlot
<?php
include "../phplot.php";
$graph = new PHPlot(600, 200);
include "./data_date.php";
$graph->SetDataType("data-data");
//Must be called before SetDataValues
$graph->SetXGridLabelType("time");
$graph->SetXDataLabelAngle(90);
$graph->SetXLabel("");
$graph->SetYLabel("Volume");
$graph->SetVertTickIncrement(30);
$graph->SetXTimeFormat("%b %y");
$graph->SetDataValues($example_data);
$graph->SetHorizTickIncrement(2679000);
$graph->SetPlotType("thinbarline");
//$graph->SetDrawXDataLabels(1);
$graph->SetPlotAreaWorld(883634400, 0, 915095000, 90);
$graph->DrawGraph();
示例5: array
$graph->SetPrecisionY(0);
$graph->SetUseTTF("0");
$graph->SetDrawYGrid("1");
// 1 = true
$graph->SetDataValues($data);
$graph->SetImageArea(600, 400);
$graph->SetVertTickIncrement("");
$graph->SetHorizTickIncrement(1);
$graph->SetErrorBarLineWidth(1);
$graph->SetYScaleType("log");
$graph->SetPointShape("halfline");
$graph->SetErrorBarShape("line");
$graph->SetPlotType("points");
$graph->SetXGridLabelType("title");
$graph->SetXLabel("Day");
$graph->SetYLabel("index");
$graph->SetTitle("Stock Market Data");
//$graph->SetErrorBarColors(array("blue","red","green","black"));
$graph->SetDataColors(array("blue", "green", "yellow", "red"), array("black"));
//$graph->SetPlotAreaWorld(0,5,32,30);
//$graph->SetPlotAreaPixels(150,50,600,400);
/*
//Other settings
$graph->SetPlotBgColor(array(222,222,222));
$graph->SetBackgroundColor(array(200,222,222)); //can use rgb values or "name" values
$graph->SetTextColor("black");
$graph->SetGridColor("black");
$graph->SetLightGridColor(array(175,175,175));
$graph->SetTickColor("black");
$graph->SetTitleColor(array(0,0,0)); // Can be array or name
*/
示例6: array
////////////////////////////////////////////////
$graph->SetDataType($which_data_type);
//Must be first thing
$graph->SetUseTTF("0");
$graph->SetDrawYGrid("1");
// 1 = true
$graph->SetDataValues($data);
$graph->SetImageArea($XSIZE_in, $YSIZE_in);
$graph->SetVertTickIncrement($which_vti);
$graph->SetHorizTickIncrement($which_hti);
$graph->SetLineWidth("1");
$graph->SetPointShape("{$which_dot}");
$graph->SetErrorBarShape("{$which_error_type}");
$graph->SetPlotType($which_plot_type);
$graph->SetXLabel($xlbl);
$graph->SetYLabel($ylbl);
$graph->SetTitle($title);
$graph->SetDataColors(array("blue", "green", "yellow", "red"), array("black"));
if ($maxy_in) {
$graph->SetPlotAreaWorld(0, $miny_in, count($data), $maxy_in);
}
//$graph->SetPlotAreaWorld(0,-5,count($data),30);
//$graph->SetPlotAreaWorld(0,-10,5,35);
//$graph->SetPlotAreaPixels(150,50,600,400);
/*
//Other settings
$graph->SetPlotBgColor(array(222,222,222));
$graph->SetBackgroundColor(array(200,222,222)); //can use rgb values or "name" values
$graph->SetTextColor("black");
$graph->SetGridColor("black");
$graph->SetLightGridColor(array(175,175,175));
示例7: array
$graph->SetPrecisionY(0);
$graph->SetUseTTF("0");
$graph->SetDrawYGrid("1");
// 1 = true
$graph->SetDataValues($data);
$graph->SetImageArea(600, 400);
$graph->SetVertTickIncrement("");
$graph->SetHorizTickIncrement(1);
$graph->SetErrorBarLineWidth(1);
$graph->SetYScaleType("log");
$graph->SetPointShape("halfline");
$graph->SetErrorBarShape("line");
$graph->SetPlotType("points");
$graph->SetXGridLabelType("title");
$graph->SetXLabel("Day");
$graph->SetYLabel("Stock value");
$graph->SetTitle("Logarithmic scale\nexample 4");
//$graph->SetErrorBarColors(array("blue","red","green","black"));
$graph->SetDataColors(array("blue", "green", "yellow", "red"), array("black"));
$graph->SetPlotAreaWorld(0, 0, 32, 50);
//$graph->SetPlotAreaPixels(150,50,600,400);
/*
//Other settings
$graph->SetPlotBgColor(array(222,222,222));
$graph->SetBackgroundColor(array(200,222,222)); //can use rgb values or "name" values
$graph->SetTextColor("black");
$graph->SetGridColor("black");
$graph->SetLightGridColor(array(175,175,175));
$graph->SetTickColor("black");
$graph->SetTitleColor(array(0,0,0)); // Can be array or name
*/