| 60 |
jpm |
1 |
<?php
|
|
|
2 |
/*
|
|
|
3 |
* This work is hereby released into the Public Domain.
|
|
|
4 |
* To view a copy of the public domain dedication,
|
|
|
5 |
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
|
|
|
6 |
* Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
|
|
|
7 |
*
|
|
|
8 |
*/
|
|
|
9 |
|
|
|
10 |
require_once ARTICHOW."/LinePlot.class.php";
|
|
|
11 |
|
|
|
12 |
class LightLinePattern extends Pattern {
|
|
|
13 |
|
|
|
14 |
public function create() {
|
|
|
15 |
|
|
|
16 |
$legend = $this->getArg('legend');
|
|
|
17 |
|
|
|
18 |
$y = $this->getArg('y');
|
|
|
19 |
|
|
|
20 |
if($y === NULL) {
|
|
|
21 |
awImage::drawError("Class LightLinePattern: Argument 'y' must not be NULL.");
|
|
|
22 |
}
|
|
|
23 |
|
|
|
24 |
$plot = new LinePlot($y);
|
|
|
25 |
$plot->setSize(0.7, 1);
|
|
|
26 |
$plot->setCenter(0.35, 0.5);
|
|
|
27 |
$plot->setPadding(35, 15, 35, 30);
|
|
|
28 |
$plot->setColor(new Orange());
|
|
|
29 |
$plot->setFillColor(new LightOrange(80));
|
|
|
30 |
|
|
|
31 |
$plot->grid->setType(Line::DASHED);
|
|
|
32 |
|
|
|
33 |
$plot->mark->setType(Mark::CIRCLE);
|
|
|
34 |
$plot->mark->setFill(new MidRed);
|
|
|
35 |
$plot->mark->setSize(6);
|
|
|
36 |
|
|
|
37 |
$plot->legend->setPosition(1, 0.5);
|
|
|
38 |
$plot->legend->setAlign(Legend::LEFT);
|
|
|
39 |
$plot->legend->shadow->smooth(TRUE);
|
|
|
40 |
|
|
|
41 |
if($legend !== NULL) {
|
|
|
42 |
$plot->legend->add($plot, $legend, Legend::MARK);
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
return $plot;
|
|
|
46 |
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
}
|
|
|
50 |
?>
|