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


PHP PHPlot::SetXLabel方法代码示例

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


在下文中一共展示了PHPlot::SetXLabel方法的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;
    }
    $type_link = "<a href={$_SERVER['PHP_SELF']}?graph_db={$graph_db}&element={$element}&graph_selected={$graph_selected}&remaining={$remaining}&graph_type=";
开发者ID:nilsine,项目名称:Astra-Vires,代码行数:31,代码来源:graph.php

示例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();
开发者ID:innomatic-libs,项目名称:phplotlib,代码行数:30,代码来源:example10.php

示例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";
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:example8.php

示例4: PHPlot

require 'mem_image.php';
$graph = new PHPlot(500, 300);
$graph->SetDataType('data-data');
//Specify some data
$data = array(array('', 2000, 750), array('', 2010, 1700), array('', 2015, 2000), array('', 2020, 1800), array('', 2025, 1300), array('', 2030, 400));
$graph->SetDataValues($data);
//Specify plotting area details
$graph->SetPlotType('lines');
$graph->SetTitleFontSize('2');
$graph->SetTitle('Social Security trust fund asset estimates, in $ billions');
$graph->SetMarginsPixels(null, null, 40, null);
$graph->SetPlotAreaWorld(2000, 0, 2035, 2000);
$graph->SetPlotBgColor('white');
$graph->SetPlotBorderType('left');
$graph->SetBackgroundColor('white');
$graph->SetDataColors(array('red'), array('black'));
//Define the X axis
$graph->SetXLabel('Year');
$graph->SetXTickIncrement(5);
//Define the Y axis
$graph->SetYTickIncrement(500);
$graph->SetPrecisionY(0);
$graph->SetLightGridColor('blue');
//Disable image output
$graph->SetPrintImage(false);
//Draw the graph
$graph->DrawGraph();
$pdf = new PDF_MemImage();
$pdf->AddPage();
$pdf->GDImage($graph->img, 30, 20, 140);
$pdf->Output();
开发者ID:rusli-nasir,项目名称:ERP_Accounting_Indonesia,代码行数:31,代码来源:PDF_plot.php

示例5: array

$graph->SetPrecisionX(0);
$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
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:example4.php

示例6: array

$graph->SetPrecisionX(0);
////////////////////////////////////////////////
$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");
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:test1.php

示例7: PHPlot

include "/usr/lib/phplot/phplot.php";
include "/usr/lib/phplot/rgb.inc.php";
include "/tmp/plot.data.php";
// Test data
//$cvs_data = array(
//	array( "", "2000/03/15", 750),
//	array("", "2010/04/18", 1700),
//	array("", "2015/05/19", 2000),
//	array("", "2030/06/20", 400)
//	);
$graph = new PHPlot(238, 220);
$graph->SetIsInline("1");
$graph->SetDataType("text-data");
$graph->SetPlotType("bars");
$graph->SetDataValues($cvs_data);
// Specify plotting area details
$graph->SetImageArea(238, 220);
$graph->SetPlotAreaPixels(55, 20, 208, 190);
$graph->SetPrecisionY("0");
$graph->SetVertTickIncrement("100");
$graph->SetTickLength("5");
$graph->SetTitleFontSize("2");
$graph->SetPlotBgColor(204, 204, 204);
$graph->SetPlotBorderType("left");
$graph->SetBackgroundColor($ColorArray["gray80"]);
// Define the X axis
$graph->SetXLabel("Date");
// Define the Y axis
$graph->SetDataColors(array("blue", "red"), array("black"));
$graph->SetFileFormat("png");
$graph->DrawGraph();
开发者ID:experimentsin,项目名称:temporary_complete_dylan_repo,代码行数:31,代码来源:inline_cvs_img.php


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