60 |
jpm |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
require_once "../LinePlot.class.php";
|
|
|
4 |
|
|
|
5 |
$graph = new Graph(400, 400);
|
|
|
6 |
|
|
|
7 |
$x = array(1, 10, 3,-4, 1);
|
|
|
8 |
|
|
|
9 |
$plot = new LinePlot($x);
|
|
|
10 |
$plot->setSpace(6, 6, 10, 10);
|
|
|
11 |
|
|
|
12 |
$plot->hideLine(TRUE);
|
|
|
13 |
$plot->setFillColor(new Color(180, 180, 180, 75));
|
|
|
14 |
|
|
|
15 |
$plot->mark->setType(Mark::IMAGE);
|
|
|
16 |
$plot->mark->setImage(new FileImage("champignon.png"));
|
|
|
17 |
|
|
|
18 |
$plot->grid->setBackgroundColor(new Color(235, 235, 180, 60));
|
|
|
19 |
|
|
|
20 |
$plot->label->set($x);
|
|
|
21 |
$plot->label->move(0, -23);
|
|
|
22 |
$plot->label->setBackgroundGradient(new LinearGradient(new Color(250, 250, 250, 10), new Color(255, 200, 200, 30), 0));
|
|
|
23 |
$plot->label->border->setColor(new Color(20, 20, 20, 20));
|
|
|
24 |
$plot->label->setPadding(3, 1, 1, 0);
|
|
|
25 |
|
|
|
26 |
$graph->add($plot);
|
|
|
27 |
$graph->draw();
|
|
|
28 |
|
|
|
29 |
?>
|