example2.php
来自「eGroupWare is a multi-user, web-based gr」· PHP 代码 · 共 28 行
PHP
28 行
<?php
include ("../jpgraph.php");
include ("../jpgraph_line.php");
$ydata = array(11,6,8,12,5,6,9,13,6,7);
// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");
$graph->SetScale("textlin");
$graph->yscale->SetAutoMin(0);
// Create the linear plot
$lineplot=new LinePlot($ydata);
// Add the plot to the graph
$graph->Add($lineplot);
$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Example 2");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");
// Display the graph
$graph->Stroke();
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?