Subversion Repositories Applications.gtt

Rev

Rev 61 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
60 jpm 1
<?php
2
 
3
require_once "../ScatterPlot.class.php";
4
 
5
$graph = new Graph(400, 400);
6
 
7
$graph->shadow->setSize(5);
8
 
9
$y = array();
10
for($i = 0; $i < 60; $i++) {
11
	$y[] = cos($i / 30 * 2 * M_PI);
12
}
13
 
14
$plot = new ScatterPlot($y);
15
$plot->setSpace(6, 6);
16
 
17
// Set impulses
18
$plot->setImpulse(new DarkGreen);
19
 
20
$plot->grid->hideVertical();
21
 
22
// Hide axis labels and ticks
23
$plot->xAxis->label->hide();
24
$plot->xAxis->hideTicks();
25
 
26
$plot->mark->setType(Mark::SQUARE);
27
$plot->mark->setSize(4);
28
 
29
$graph->add($plot);
30
$graph->draw();
31
 
32
?>