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(300, 280);
6
 
7
$graph->title->set('Linked ScatterPlot');
8
$graph->title->setFont(new TuffyItalic(14));
9
$graph->shadow->setSize(4);
10
 
11
$y = array(1, 10, 7, 8, 5, 4, 2, 4);
12
$x = array(0.5, 0.5, 1.5, 4, 3, 5, 2, 2);
13
 
14
$plot = new ScatterPlot($y, $x);
15
$plot->setBackgroundColor(new Color(235, 235, 235));
16
 
17
$plot->mark->setSize(15);
18
$plot->mark->setFill(
19
	new RadialGradient(
20
		new LightGreen,
21
		new DarkGreen
22
	)
23
);
24
 
25
$plot->link(TRUE);
26
$plot->setColor(new DarkGreen);
27
 
28
$plot->setSpace(6, 6, 6, 0);
29
$plot->setPadding(25, NULL, 40, 20);
30
 
31
$graph->add($plot);
32
$graph->draw();
33
 
34
?>