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
$graph->title->set('ScatterPlot with values');
9
 
10
$y = array(4, 3, 2, 5, 8, 1, 3, 6, 4, 5);
11
$x = array(1, 2, 5, 4, 3, 6, 2, 4, 5, 1);
12
 
13
$plot = new ScatterPlot($y, $x);
14
$plot->setSpace(6, 6, 6, 0);
15
$plot->setPadding(NULL, NULL, 40, 20);
16
 
17
// Set dashed lines on the grid
18
$plot->grid->setType(Line::DASHED);
19
 
20
$plot->mark->setSize(30);
21
$plot->mark->setFill(new DarkOrange(20));
22
 
23
 
24
$plot->label->set($y);
25
$plot->label->setColor(new White);
26
 
27
$graph->add($plot);
28
$graph->draw();
29
 
30
?>