-
Notifications
You must be signed in to change notification settings - Fork 0
/
gdtest.php
42 lines (39 loc) · 1.32 KB
/
gdtest.php
1
<?php include("phplot.php"); $graph = new PHPlot; $graph->SetDataType("data-data"); //Must be first thing$data = array( array("",1,2000), array("",2,33000), array("",3,6600), array("",4,120000) ); $graph->SetDataValues($data); $graph->SetImageArea(400, 400); $graph->SetPlotAreaPixels(100,10, 400, 300); $graph->SetPlotType("area"); $graph->SetFileFormat("PNG"); $graph->SetNumVertTicks(1); $graph->SetNumHorizTicks(1); $graph->SetPrecisionX(0); $graph->SetPrecisionY(0); $graph->SetLineWidth("1"); $graph->SetDrawYGrid("1"); // 1 = true $graph->SetPointShape("dot"); $graph->SetXLabel("Time"); $graph->SetYLabel("Fish stocks"); $graph->SetTitle("History of fish stocks"); $graph->SetXAxisPosition($which_xap); $graph->SetDataColors( array("red", "blue","green","yellow","red"), //Data Colors array("black") //Border Colors ); $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("blue"); // Can be array or name $graph->DrawGraph();?>