1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
<?php
require_once "Artichow-php5/Graph.class.php";
require_once "Artichow-php5/LinePlot.class.php";
$graph = new Graph(400, 30);
$graph->border->hide();
// $drawer = $graph->draw("BeloGraph.png");
$drawer = $graph->getDriver();
for($i = 7; $i < 400; $i += 15) {
$drawer->line(
new Color(0, 0, 0),
new Line(
new Point($i, 0),
new Point($i, 30)
)
);
}
for($i = 7; $i < 30; $i += 15) {
$drawer->line(
new Color(0, 0, 0),
new Line(
new Point(0, $i),
new Point(400, $i)
)
);
}
$drawer->filledRectangle(
new Color(0, 100, 200, 50),
new Line(
new Point(0, 0),
new Point(400, 30)
)
);
$graph->draw();
?> |
Partager