-
Notifications
You must be signed in to change notification settings - Fork 7
/
test.php
31 lines (26 loc) · 952 Bytes
/
test.php
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
28
29
30
31
<?php
// This is a test script demonstrating the use of the gd-heatmap library.
require_once('gd_heatmap.php');
// Generate some test data using the static function provided for that purpose.
$data = gd_heatmap::get_test_data(1240, 600, 50, 500);
// Config array with all the available options. See the constructor's doc block
// for explanations.
$config = array(
'debug' => TRUE,
'width' => 1240,
'height' => 600,
'noc' => 32,
'r' => 50,
'dither' => FALSE,
'format' => 'jpeg',
'fill_with_smallest' => false,
);
// Create a new heatmap based on the data and the config.
$heatmap = new gd_heatmap($data, $config);
// And print it out. If you're having trouble getting any images out of the
// library , comment this out to allow your browser to show you the error
// messages.
$heatmap->output();
// Or save it to a file. Don't forget to set correct file permissions in the
// target directory.
//$heatmap->output('savetest.png');