Added JPGraph v3.5.0b1
This commit is contained in:
35
includes/jpgraph/src/Examples/centeredlineex01.php
Normal file
35
includes/jpgraph/src/Examples/centeredlineex01.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once ('jpgraph/jpgraph.php');
|
||||
require_once ('jpgraph/jpgraph_line.php');
|
||||
require_once ('jpgraph/jpgraph_error.php');
|
||||
|
||||
|
||||
//$datax = array(3.5,3.7,3,4,6.2,6,3.5,8,14,8,11.1,13.7);
|
||||
$datay = array(1.23,1.9,1.6,3.1,3.4,2.8,2.1,1.9);
|
||||
$graph = new Graph(300,200);
|
||||
$graph->img->SetMargin(40,40,40,40);
|
||||
$graph->img->SetAntiAliasing();
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetShadow();
|
||||
$graph->title->Set("Example of line centered plot");
|
||||
$graph->title->SetFont(FF_FONT1,FS_BOLD);
|
||||
|
||||
|
||||
// Use 20% "grace" to get slightly larger scale then min/max of
|
||||
// data
|
||||
$graph->yscale->SetGrace(20);
|
||||
|
||||
|
||||
$p1 = new LinePlot($datay);
|
||||
$p1->mark->SetType(MARK_FILLEDCIRCLE);
|
||||
$p1->mark->SetFillColor("red");
|
||||
$p1->mark->SetWidth(4);
|
||||
$p1->SetColor("blue");
|
||||
$p1->SetCenter();
|
||||
$graph->Add($p1);
|
||||
|
||||
$graph->Stroke();
|
||||
|
||||
?>
|
||||
|
||||
|
Reference in New Issue
Block a user