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


PHP Graph::SetFrame方法代码示例

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


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

示例1: array

<?php

// content="text/plain; charset=utf-8"
require_once '../../vendor/autoload.php';
use Amenadiel\JpGraph\Graph;
use Amenadiel\JpGraph\Plot;
// Some data
$datay = array(7, 19, 11, 4, 20);
// Create the graph and setup the basic parameters
$graph = new Graph\Graph(300, 200, 'auto');
$graph->img->SetMargin(40, 30, 40, 50);
$graph->SetScale("textint");
$graph->SetFrame(true, 'blue', 1);
$graph->SetColor('lightblue');
$graph->SetMarginColor('lightblue');
// Setup X-axis labels
$a = $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($a);
$graph->xaxis->SetFont(FF_FONT1);
$graph->xaxis->SetColor('darkblue', 'black');
// Setup "hidden" y-axis by given it the same color
// as the background (this could also be done by setting the weight
// to zero)
$graph->yaxis->SetColor('lightblue', 'darkblue');
$graph->ygrid->SetColor('white');
// Setup graph title ands fonts
$graph->title->Set('Using grace = 10%');
$graph->title->SetFont(FF_FONT2, FS_BOLD);
$graph->xaxis->SetTitle('Year 2002', 'center');
$graph->xaxis->SetTitleMargin(10);
$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD);
开发者ID:amenadiel,项目名称:jpgraph,代码行数:31,代码来源:grace_ex1.php

示例2: array

<?php

// content="text/plain; charset=utf-8"
require_once '../../vendor/autoload.php';
use Amenadiel\JpGraph\Graph;
use Amenadiel\JpGraph\Plot;
$datay = array(2, 3, 5, 8, 12, 6, 3);
$datax = array("320x240", "640x480", "600x800", "1024x768", "1280x1024(16)", "1280x1024(32)", "1600x1200(32)");
// Size of graph
$width = 300;
$height = 400;
// Set the basic parameters of the graph
$graph = new Graph\Graph($width, $height, 'auto');
$graph->SetScale("textlin");
// No frame around the image
$graph->SetFrame(false);
// Rotate graph 90 degrees and set margin
$graph->Set90AndMargin(100, 20, 50, 30);
// Set white margin color
$graph->SetMarginColor('white');
// Use a box around the plot area
$graph->SetBox();
// Use a gradient to fill the plot area
$graph->SetBackgroundGradient('white', 'lightblue', GRAD_HOR, BGRAD_PLOT);
// Setup title
$graph->title->Set("Graphic card performance");
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 11);
$graph->subtitle->Set("(Non optimized)");
// Setup X-axis
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 8);
开发者ID:amenadiel,项目名称:jpgraph,代码行数:31,代码来源:horizbarex6.php


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