Source for file drivers1.php
Documentation is available at drivers1.php
include 'Image/Graph.php';
include 'Image/Graph/Driver.php';
// create a PNG driver (this is normally default)
$Font = & $Graph->addNew ('ttf_font', 'Gothic');
// use this by default in the graph
Image_Graph::factory('title', array ('Anybody recognize?', array ('size' => 7 , 'color' => 'gray@0.6', 'angle' => 270 ))),
$Grid->setLineColor ('white@0.4');
$Dataset->addPoint (1 , 20 );
$Dataset->addPoint (2 , 10 );
$Dataset->addPoint (3 , 35 );
$Dataset->addPoint (4 , 5 );
$Dataset->addPoint (5 , 18 );
$Dataset->addPoint (6 , 33 );
$Plot = & $Plotarea->addNew ('step', &$Dataset);
// fill the plot with a vertical gradient fill
$Plot->setFillStyle ($Fill);
// fill the plotarea with a vertical gradient fill
$Plotarea->setFillStyle ($Fill);
// configure the y-axis options
$AxisY->forceMaximum (40 );
$AxisY->setLabelInterval (10 );
// set some graph options
$Graph->setBackgroundColor ('green@0.2');
$Graph->setBorderColor ('black');
// make the plot have a black border
$Plot->setBorderColor ('black');
Documentation generated on Mon, 11 Mar 2019 14:21:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|