Version 1.9g
This commit is contained in:
parent
d028822d0b
commit
4c9814a99c
800 changed files with 237325 additions and 1949 deletions
37
artichow/examples/scatter-005.php
Normal file
37
artichow/examples/scatter-005.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
require_once "../ScatterPlot.class.php";
|
||||
|
||||
$graph = new Graph(400, 400);
|
||||
|
||||
$graph->title->set('Impulses');
|
||||
$graph->title->move(0, 30);
|
||||
$graph->shadow->setSize(5);
|
||||
|
||||
$y = array();
|
||||
for($i = 0; $i < 60; $i++) {
|
||||
$y[] = cos($i / 30 * 2 * M_PI) / (1.5 + $i / 15);
|
||||
}
|
||||
|
||||
$plot = new ScatterPlot($y);
|
||||
$plot->setBackgroundColor(new VeryLightOrange);
|
||||
$plot->setSpace(5);
|
||||
|
||||
// Set impulses
|
||||
$plot->setImpulse(new DarkBlue);
|
||||
|
||||
$plot->grid->hideVertical();
|
||||
|
||||
// Hide ticks
|
||||
$plot->xAxis->hideTicks();
|
||||
|
||||
// Change labels interval
|
||||
$plot->xAxis->label->setInterval(5);
|
||||
|
||||
$plot->mark->setType(Mark::SQUARE);
|
||||
$plot->mark->setSize(4);
|
||||
|
||||
$graph->add($plot);
|
||||
$graph->draw();
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue