當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。