Version 1.9g
This commit is contained in:
parent
d028822d0b
commit
4c9814a99c
800 changed files with 237325 additions and 1949 deletions
32
artichow/examples/scatter-004.php
Normal file
32
artichow/examples/scatter-004.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
require_once "../ScatterPlot.class.php";
|
||||
|
||||
$graph = new Graph(400, 400);
|
||||
|
||||
$graph->shadow->setSize(5);
|
||||
|
||||
$y = array();
|
||||
for($i = 0; $i < 60; $i++) {
|
||||
$y[] = cos($i / 30 * 2 * M_PI);
|
||||
}
|
||||
|
||||
$plot = new ScatterPlot($y);
|
||||
$plot->setSpace(6, 6);
|
||||
|
||||
// Set impulses
|
||||
$plot->setImpulse(new DarkGreen);
|
||||
|
||||
$plot->grid->hideVertical();
|
||||
|
||||
// Hide axis labels and ticks
|
||||
$plot->xAxis->label->hide();
|
||||
$plot->xAxis->hideTicks();
|
||||
|
||||
$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