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, 240);
6
 
7
$graph->title->set('Simple ScatterPlot');
8
$graph->shadow->setSize(4);
9
 
10
$y = array(1, 1.3, 1.8, 1.6, 10, 7, 8, 3, 4, 2, 4);
11
$x = array(0.5, 0.7, 0.65, 0.9, 0.5, 1.5, 4, 3, 5, 2, 2);
12
 
13
$plot = new ScatterPlot($y, $x);
14
$plot->setBackgroundColor(new Color(255, 245, 220));
15
 
16
$plot->mark->setSize(15);
17
$plot->mark->setFill(
18
	new RadialGradient(
19
		new LightRed,
20
		new Red
21
	)
22
);
23
 
24
$plot->setSpace(6, 6, 6, 0);
25
$plot->setPadding(25, NULL, 40, 20);
26
 
27
$graph->add($plot);
28
$graph->draw();
29
 
30
?>