File: impulsex2.php

package info (click to toggle)
libphp-jpgraph 1.5.2-11%2Bu1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 888 kB
  • ctags: 2,689
  • sloc: php: 8,992; makefile: 24
file content (27 lines) | stat: -rw-r--r-- 720 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
include ("/usr/share/jpgraph/jpgraph.php");
include ("/usr/share/jpgraph/jpgraph_scatter.php");

$datay = array(20,22,12,13,17,20,16,19,30,31,40,43);
$graph = new Graph(300,200,"auto");
$graph->img->SetMargin(40,40,40,40);		
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->title->Set("Example 2 of impuls scatter plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->Set("Impuls respons");
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$sp1 = new ScatterPlot($datay);//,$datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->SetImpuls();
$sp1->SetColor("blue");
$sp1->SetWeight(3);
$sp1->mark->SetWidth(4);

$graph->Add($sp1);

$graph->Stroke();

?>