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


PHP Plot::DisplayPlot方法代码示例

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


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

示例1: Plot

//This is also why you can't use html in this example.
header("Content-type: image/png");
/*
Include plot.class.php, since we need the file to draw with.
*/
include "plot.class.php";
//Create an instance of Plot
$Plot = new Plot();
//Initialize some fields on the Plot
$Plot->Caption = "Example plot";
//Setting image size
$Plot->Width = 500;
$Plot->Height = 500;
//Setting coordinate space
$Plot->MinX = -250;
$Plot->MaxX = 250;
$Plot->MinY = -250;
$Plot->MaxY = 250;
//Creating an instance of Graph
$G = new Graph();
//Set the expression of the graph to the parameter given via the GET method.
$G->Exp = $_GET["exp"];
//Set the color of the Graph
$G->Color = array(0, 0, 255);
//Set the label of the Graph
$G->Label = "GET graph";
//Add all (in this case only one) instances of Graph to an array and parse to Plot
$Plot->Graphs = array($G);
//Display the final Image, printed as binary png in this file.
$Plot->DisplayPlot();
开发者ID:mediawiki-extensions,项目名称:wikiplot,代码行数:30,代码来源:On-The-Fly_Plotting.php


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