-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransparentBackground.php
More file actions
33 lines (29 loc) · 905 Bytes
/
TransparentBackground.php
File metadata and controls
33 lines (29 loc) · 905 Bytes
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
32
33
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use Macocci7\PhpScatterplot\Scatterplot;
$layers = [
'John' => [
'x' => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ],
'y' => [ 1, 2, 3, 4, 5, 8, 4, 7, 11, 9, 1, ],
],
'Jake' => [
'x' => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ],
'y' => [ 11, 8, 10, 7, 9, 6, 5, 3, 4, 2, 1, ],
],
'Hugo' => [
'x' => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ],
'y' => [ 4, 8, 10, 1, 9, 6, 5, 3, 7, 1, 11, ],
],
'Alex' => [
'x' => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ],
'y' => [ 3, 5, 11, 4, 8, 2, 9, 10, 1, 11, 7, ],
],
];
$sp = new Scatterplot();
$sp->layers($layers)
->config(__DIR__ . '/AdjustDisplayByNeon.neon')
->config([
// This results in transparent background
'canvasBackgroundColor' => null,
])
->create(__DIR__ . '/img/TransparentBackground.png');