forked from halo-battle/game
Version 1.9g
This commit is contained in:
parent
d028822d0b
commit
4c9814a99c
800 changed files with 237325 additions and 1949 deletions
46
artichow/examples/site/mini-005.php
Normal file
46
artichow/examples/site/mini-005.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/*
|
||||
* This work is hereby released into the Public Domain.
|
||||
* To view a copy of the public domain dedication,
|
||||
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
|
||||
* Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
require_once "../../LinePlot.class.php";
|
||||
|
||||
$graph = new Graph(150, 100);
|
||||
|
||||
$graph->setAntiAliasing(TRUE);
|
||||
|
||||
$x = array();
|
||||
for($i = 0; $i < 10; $i++) {
|
||||
$x[] = mt_rand(1, 99) / 10;
|
||||
}
|
||||
|
||||
$plot = new LinePlot($x);
|
||||
$plot->setBackgroundColor(new Color(240, 240, 240));
|
||||
$plot->setPadding(30, 8, 8, 20);
|
||||
|
||||
$plot->setColor(
|
||||
new Color(60, 60, 150)
|
||||
);
|
||||
$plot->setFillGradient(
|
||||
new LinearGradient(
|
||||
new Color(120, 175, 80, 47),
|
||||
new Color(231, 172, 113, 30),
|
||||
0
|
||||
)
|
||||
);
|
||||
|
||||
$plot->grid->setType(Line::DASHED);
|
||||
|
||||
$plot->yAxis->setLabelNumber(2);
|
||||
$plot->yAxis->setLabelPrecision(1);
|
||||
|
||||
$plot->xAxis->setLabelInterval(2);
|
||||
$plot->xAxis->setNumberByTick('minor', 'major', 2);
|
||||
|
||||
$graph->add($plot);
|
||||
$graph->draw();
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue