cvs: pear /Image_Graph/Graph Legend.php Plot.php /Image_Graph/Graph/Plot Odo.php /Image_Graph/docs ChangeLog README /Image_Graph/docs/examples
axis_direction.php double_category_axis.php log_axis_intersect.php misc01.php plot_pie_rotate.php simple.php small_pie_plot.php
| From: | Jesper Veggerby Hansen | Date: | Fri, 30 Sep 2005 18:59:21 +0000 |
| Subject: | cvs: pear /Image_Graph/Graph Legend.php Plot.php /Image_Graph/Graph/Plot Odo.php /Image_Graph/docs ChangeLog README /Image_Graph/docs/examples axis_direction.php double_category_axis.php log_axis_intersect.php misc01.php plot_pie_rotate.php simple.php small_pie_plot.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35189@lists.php.net to get a copy of this message | ||
nosey Fri Sep 30 14:59:21 2005 EDT
Added files:
/pear/Image_Graph/docs/examples log_axis_intersect.php
double_category_axis.php
small_pie_plot.php
plot_pie_rotate.php simple.php
axis_direction.php
Modified files:
/pear/Image_Graph/docs/examples misc01.php
/pear/Image_Graph/docs ChangeLog README
/pear/Image_Graph/Graph Legend.php Plot.php
/pear/Image_Graph/Graph/Plot Odo.php
Log:
Committing minor issues for next release
http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/misc01.php?r1=1.4&r2=1.5&ty=u Index: pear/Image_Graph/docs/examples/misc01.php diff -u pear/Image_Graph/docs/examples/misc01.php:1.4 pear/Image_Graph/docs/examples/misc01.php:1.5 --- pear/Image_Graph/docs/examples/misc01.php:1.4 Wed Aug 3 17:21:52 2005 +++ pear/Image_Graph/docs/examples/misc01.php Fri Sep 30 14:59:17 2005 @@ -9,7 +9,7 @@ * One legend for many plotareas, Plotarea customizations, Fillarray usage, * Datapreprocessor, Axis customizations * - * $Id: misc01.php,v 1.4 2005/08/03 21:21:52 nosey Exp $ + * $Id: misc01.php,v 1.5 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -144,6 +144,8 @@ // use the data label array on the X axis $AxisX->setDataPreprocessor($ArrayData); $AxisX->setFontAngle('vertical'); +$AxisX->setAxisIntersection('max'); +$AxisX->setLabelOption('position', 'inside'); $Plotarea_BarAndLine->setAxisPadding(array('left' => 20, 'right' => 20)); http://cvs.php.net/diff.php/pear/Image_Graph/docs/ChangeLog?r1=1.40&r2=1.41&ty=u Index: pear/Image_Graph/docs/ChangeLog diff -u pear/Image_Graph/docs/ChangeLog:1.40 pear/Image_Graph/docs/ChangeLog:1.41 --- pear/Image_Graph/docs/ChangeLog:1.40 Wed Sep 14 16:27:24 2005 +++ pear/Image_Graph/docs/ChangeLog Fri Sep 30 14:59:18 2005 @@ -1,16 +1,27 @@ ************************* Image_Graph - Changelog ************************* -Version x.y.z-alpha [2005-xxx-xx] - Jesper Veggerby <pear.nosey@veggerby.dk> +Version 0.7.0-alpha [2005-Sep-30] - Jesper Veggerby <pear.nosey@veggerby.dk> * Added Image_Graph_Plot_Odo (thanks Maxime Delorme) * Added Image_Graph_DataSelector_Values (thanks Paolo) * Added best-fit line plot (Image_Graph_Plot_Fit_Line) + * Added possibility to specify the pie plot diameter * Modified Image_Graph_Plot_CandleStick, it is now only necessary to specify 'open' for first point (other 'open' = previous 'close') + * Changed Image_Graph_Plotarea::hideAxis() to actually hide the axis, not remove them + * Added Image_Graph_Plotarea::clearAxis() to remove the axis * Fixed markers so that y values equal to null never shows markers * Fixed problem in Image_Graph_Plot_BoxWhisker causing an undefined method * Fixed problem with markers and horizontal plots * Fixed problem with axis not showing arrow-ends even if enabled * Fixed problem with an error "Call to a member function on a non-object..." in Common.php + * Fixed a problem with Image_Graph_Dataset_Trivial when supplying a datarray as constructor parameter and Image_Graph_Fill_Array + * Fixed Bug #5421 "Documentation for Image_Graph constructor wrong" + * Fixed Bug #5502 "Axis_Logarithmic::setAxisIntersection('max') is broken" + * Fixed Bug #5504 "PHP Notice: Undefined index: tohtml" + * Fixed PHP notice with Image_Graph::done() when using output to file + * Fixed so it is possible to use array(R, G, B, a?) as fill color + * Fixed issue with markers not rotating along with plot when using setStartingAngle() + * Fixed trivial dataset so that it is possible to use 'id' as key when populating dataset in constructor Version 0.6.0-alpha [2005-Aug-27] - Jesper Veggerby <pear.nosey@veggerby.dk> * Added possibility to set starting angle of pie chart (at which angle does the first pieslice start) and the direction of the pies (clockwise or counter-clockwise) http://cvs.php.net/diff.php/pear/Image_Graph/docs/README?r1=1.14&r2=1.15&ty=u Index: pear/Image_Graph/docs/README diff -u pear/Image_Graph/docs/README:1.14 pear/Image_Graph/docs/README:1.15 --- pear/Image_Graph/docs/README:1.14 Sat Aug 27 13:27:32 2005 +++ pear/Image_Graph/docs/README Fri Sep 30 14:59:18 2005 @@ -1,7 +1,7 @@ ******************************* Image_Graph ******************************* - version 0.6.0-alpha + version 0.8.0-alpha ------ CopyRight (C) Jesper Veggerby Hansen, 2003-2005 ------ http://pear.php.net/package/Image_Graph @@ -74,11 +74,16 @@ Documentation ------------- -See http://pear.php.net/package/Image_Graph/docs for documentation +See http://pear.php.net/package/Image_Graph/docs for API documentation + +See http://wiki.veggerby.dk/doku.php?id=image_graph for End-User documentation + +See http://pear.veggerby.dk/ for samples History ------- Release history of Image_Graph/GraPHPite (see also ChangeLog for changes) +0.7.0 30-Sep-2005 0.6.0 27-Aug-2005 0.5.0 08-Aug-2005 (First release using Image_Canvas) 0.4.0 24-May-2005 http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Legend.php?r1=1.14&r2=1.15&ty=u Index: pear/Image_Graph/Graph/Legend.php diff -u pear/Image_Graph/Graph/Legend.php:1.14 pear/Image_Graph/Graph/Legend.php:1.15 --- pear/Image_Graph/Graph/Legend.php:1.14 Wed Aug 24 16:35:56 2005 +++ pear/Image_Graph/Graph/Legend.php Fri Sep 30 14:59:18 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Legend.php,v 1.14 2005/08/24 20:35:56 nosey Exp $ + * @version CVS: $Id: Legend.php,v 1.15 2005/09/30 18:59:18 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -118,7 +118,8 @@ * @return array Default parameter array * @access private */ - function _parameterArray($simulate = false) { + function _parameterArray($simulate = false) + { $param['left'] = $this->_left + $this->_padding; $param['top'] = $this->_top + $this->_padding; $param['right'] = $this->_right - $this->_padding; http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Plot.php?r1=1.17&r2=1.18&ty=u Index: pear/Image_Graph/Graph/Plot.php diff -u pear/Image_Graph/Graph/Plot.php:1.17 pear/Image_Graph/Graph/Plot.php:1.18 --- pear/Image_Graph/Graph/Plot.php:1.17 Thu Sep 8 15:02:18 2005 +++ pear/Image_Graph/Graph/Plot.php Fri Sep 30 14:59:19 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Plot.php,v 1.17 2005/09/08 19:02:18 nosey Exp $ + * @version CVS: $Id: Plot.php,v 1.18 2005/09/30 18:59:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -763,7 +763,7 @@ $width = 20 + $param['width'] + $this->_canvas->textWidth($caption); $param['maxwidth'] = max($param['maxwidth'], $width); $x2 = $param['x'] + $width; - $y2 = $param['y'] + $param['height']+5; + $y2 = $param['y'] + $param['height'] + 5; if ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) && ($y2 > $param['bottom'])) { $param['y'] = $param['top']; http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Plot/Odo.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/Graph/Plot/Odo.php diff -u pear/Image_Graph/Graph/Plot/Odo.php:1.1 pear/Image_Graph/Graph/Plot/Odo.php:1.2 --- pear/Image_Graph/Graph/Plot/Odo.php:1.1 Tue Aug 30 17:25:24 2005 +++ pear/Image_Graph/Graph/Plot/Odo.php Fri Sep 30 14:59:19 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Odo.php,v 1.1 2005/08/30 21:25:24 nosey Exp $ + * @version CVS: $Id: Odo.php,v 1.2 2005/09/30 18:59:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -360,7 +360,8 @@ * * @access private */ - function _drawAxis(){ + function _drawAxis() + { //draw outline $this->_getLineStyle(); $this->_canvas->pieslice( @@ -579,7 +580,8 @@ * * @access private */ - function _drawRange(){ + function _drawRange() + { if($this->_range){ $radius0 = $this->_radius * (1 - $this->_radiusPercent/100); foreach ($this->_range as $range) { http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/log_axis_intersect.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/log_axis_intersect.php +++ pear/Image_Graph/docs/examples/log_axis_intersect.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Demonstrate logarithmic axis * * Other: * Matrix layout, Axis titles * * $Id: log_axis_intersect.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; require_once 'Image/Canvas.php'; $Canvas =& Image_Canvas::factory('png', array('width' => 600, 'height' => 400, 'antialias' => true)); // create the graph $Graph =& Image_Graph::factory('graph', $Canvas); // add a TrueType font $Font =& $Graph->addNew('font', 'Verdana'); // set the font size to 15 pixels $Font->setSize(8); // add a title using the created font for ($i = 0; $i < 2; $i++) { for ($j = 0; $j < 2; $j++) { $Axis['X'][($i*2+$j)] = 'axis' . ($i % 2 == 0 ? '' : '_log'); $Axis['Y'][($i*2+$j)] = 'axis' . ($j % 2 == 0 ? '' : '_log'); } } for ($i = 0; $i < 4; $i++) { $Plotarea[$i] =& Image_Graph::factory('plotarea', array($Axis['X'][$i], $Axis['Y'][$i])); } $Graph->setFont($Font); // create the plotarea $Graph->add( Image_Graph::vertical( Image_Graph::factory('title', array('Logarithmic Axis', 11)), Image_Graph::vertical( Image_Graph::horizontal( Image_Graph::vertical( Image_Graph::factory('title', array('Normal Y-Axis', array('size' => 10, 'angle' => 90))), Image_Graph::factory('title', array('Logarithmic Y-Axis', array('size' => 10, 'angle' => 90))) ), Image_Graph::horizontal( Image_Graph::vertical( Image_Graph::factory('title', array('Normal X-Axis', 10)), Image_Graph::vertical( $Plotarea[0], $Plotarea[1] ), 7 ), Image_Graph::vertical( Image_Graph::factory('Image_Graph_Title', array('Logarithmic X-Axis', 10)), Image_Graph::vertical( $Plotarea[2], $Plotarea[3] ), 7 ) ), 4 ), $Legend = Image_Graph::factory('Image_Graph_Legend'), 92 ), 5 ) ); $Legend->setPlotarea($Plotarea[0]); $Dataset = Image_Graph::factory('dataset'); $i = 1; while ($i <= 10) { $Dataset->addPoint($i, $i*$i); $i++; } for ($i = 0; $i < 4; $i++) { $Plotarea[$i]->addNew('line_grid', false, IMAGE_GRAPH_AXIS_X); $Plotarea[$i]->addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y); if ($i % 2 == 1) { $Axis =& $Plotarea[$i]->getAxis(IMAGE_GRAPH_AXIS_Y); $Axis->setLabelInterval(array(1, 2, 3, 5, 10, 20, 30, 50, 100)); } $AxisX =& $Plotarea[$i]->getAxis(IMAGE_GRAPH_AXIS_X); $AxisX->setAxisIntersection('max'); $Plot =& $Plotarea[$i]->addNew('line', array(&$Dataset)); $Plot->setLineColor('red'); $Plot->setTitle("x^2"); } $Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/double_category_axis.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/double_category_axis.php +++ pear/Image_Graph/docs/examples/double_category_axis.php <?php /** * Usage example for Image_Graph. * * Main purpose: * PDF canvas * * Other: * Datapreprocessor, Axis markers * * $Id: double_category_axis.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; // create the graph $Graph =& Image_Graph::factory('graph', array(400, 300)); // add a TrueType font $Font =& $Graph->addNew('ttf_font', 'Verdana'); // set the font size to 11 pixels $Font->setSize(7); $Graph->setFont($Font); // create the plotarea $Graph->add( Image_Graph::vertical( Image_Graph::factory('title', array('Testing Category Axis', 10)), $Plotarea = Image_Graph::factory('plotarea', array('Image_Graph_Axis_Category', 'Image_Graph_Axis_Category')), 5 ) ); $DS =& Image_Graph::factory('dataset'); $DS->addPoint('Apache', 'Open Source'); $DS->addPoint('BSD', 'Open Source'); $DS->addPoint('Linux', 'Open Source'); $DS->addPoint('Microsoft', 'Proprietary'); $DS->addPoint('Micro', 'Proprietary'); $DS->addPoint('Minisoft', 'Proprie'); $DS->addPoint('Millisoft', 'Prop'); $DS2 =& Image_Graph::factory('dataset'); $DS->addPoint('Apache', 'Open Source'); $DS->addPoint('BSD', 'Open Source'); $DS->addPoint('Linux', 'Open Source'); $DS->addPoint('Microsoft', 'Proprietary'); $DS->addPoint('Micro', 'Proprietary'); $DS->addPoint('Minisoft', 'Proprie'); $DS->addPoint('Miniority', 'Proprias'); $Plot =& $Plotarea->addNew('scatter', $DS); //$Plot->setLineColor('red'); $Plot2 =& $Plotarea->addNew('scatter', $DS2); $Marker =& Image_Graph::factory('Image_Graph_Marker_Cross'); $Marker->setFillColor('blue'); $Marker->setLineColor('black'); $Plot->setMarker($Marker); $Marker =& Image_Graph::factory('Image_Graph_Marker_Cross'); $Marker->setFillColor('red'); $Marker->setLineColor('black'); $Plot2->setMarker($Marker); $Graph->done(); //$DS =& Image_Graph::factory('dataset'); //$DS->addPoint('Germany', 'England'); //$DS->addPoint('Denmark', 'France'); //$DS->addPoint('Sweden', 'Denmark'); //$DS->addPoint('England', 'France'); //$DS->addPoint('Norway', 'Finland'); //$DS->addPoint('Denmark', 'Finland'); //$DS->addPoint('Iceland', 'Germany'); //$DS->addPoint('Norway', 'France'); // //$DS2 =& Image_Graph::factory('dataset'); //$DS2->addPoint('Sweden', 'France'); //$DS2->addPoint('Austria', 'Germany'); //$DS2->addPoint('Norway', 'Holland'); //$DS2->addPoint('Denmark', 'Germany'); //$DS2->addPoint('Sweden', 'Holland'); //$DS2->addPoint('Iceland', 'Denmark'); // //$Plot =& $Plotarea->addNew('scatter', $DS); //$Marker =& Image_Graph::factory('Image_Graph_Marker_Cross'); //$Marker->setFillColor('blue'); //$Marker->setLineColor('black'); //$Plot->setMarker($Marker); // //$Plot2 =& $Plotarea->addNew('scatter', $DS2); //$Marker2 =& Image_Graph::factory('Image_Graph_Marker_Plus'); //$Marker2->setFillColor('yellow'); //$Marker2->setLineColor('black'); //$Plot2->setMarker($Marker2); // //$Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/small_pie_plot.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/small_pie_plot.php +++ pear/Image_Graph/docs/examples/small_pie_plot.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Show pie chart * * Other: * None specific * * $Id: small_pie_plot.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; // create the graph $Graph =& Image_Graph::factory('graph', array(80, 80)); // add a TrueType font $Font =& $Graph->addNew('font', 'Verdana'); // set the font size to 11 pixels $Font->setSize(8); $Graph->setFont($Font); // create the plotareas $Plotarea =& $Graph->addNew('plotarea'); $Plotarea->hideAxis(); // create the dataset $Dataset =& Image_Graph::factory('random', array(10, 10, 20, true)); // create the 1st plot as smoothed area chart using the 1st dataset $Plot =& $Plotarea->addNew('Image_Graph_Plot_Pie', $Dataset); $Plot->setDiameter(-1); $Plotarea->setPadding(0); // set a line color $Plot->setLineColor('gray'); // set a standard fill style $FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); $Plot->setFillStyle($FillArray); $FillArray->addColor('green@0.2'); $FillArray->addColor('blue@0.2'); $FillArray->addColor('yellow@0.2'); $FillArray->addColor('red@0.2'); $FillArray->addColor('orange@0.2'); $Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/plot_pie_rotate.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/plot_pie_rotate.php +++ pear/Image_Graph/docs/examples/plot_pie_rotate.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Demonstrate radial gradient fillings * * Other: * None specific * * $Id: plot_pie_rotate.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; // create the graph $Graph =& Image_Graph::factory('graph', array(400, 300)); // add a TrueType font $Font =& $Graph->addNew('font', 'Verdana'); // set the font size to 7 pixels $Font->setSize(7); $Graph->setFont($Font); // create the plotarea $Graph->add( Image_Graph::vertical( Image_Graph::factory('title', array('Meat Export', 12)), Image_Graph::horizontal( $Plotarea = Image_Graph::factory('plotarea'), $Legend = Image_Graph::factory('legend'), 70 ), 5 ) ); $Legend->setPlotarea($Plotarea); // create the 1st dataset $Dataset1 =& Image_Graph::factory('dataset'); $Dataset1->addPoint('Beef', rand(1, 10)); $Dataset1->addPoint('Pork', rand(1, 10)); $Dataset1->addPoint('Poultry', rand(1, 10)); $Dataset1->addPoint('Camels', rand(1, 10)); $Dataset1->addPoint('Other', rand(1, 10)); // create the 1st plot as smoothed area chart using the 1st dataset $Plot =& $Plotarea->addNew('pie', array(&$Dataset1)); $Plotarea->hideAxis(); // create a Y data value marker $Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_PCT_Y_TOTAL); // create a pin-point marker type $PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker)); // and use the marker on the 1st plot $Plot->setMarker($PointingMarker); // format value marker labels as percentage values $Marker->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%')); $Plot->Radius = 2; $FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); $Plot->setFillStyle($FillArray); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'green')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'blue')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'yellow')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'red')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'orange')); $Plot->explode(5); $Plot->setStartingAngle(90); // output the Graph $Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/simple.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/simple.php +++ pear/Image_Graph/docs/examples/simple.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Datapreprocessing usage and idea * * Other: * Matrix layout * * $Id: simple.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ error_reporting(E_ALL); include 'Image/Graph.php'; $Graph =& Image_Graph::factory('graph', array(400, 300)); $Plotarea =& $Graph->addNew('plotarea'); $Dataset =& Image_Graph::factory('dataset'); $Dataset->addPoint('Denmark', 10); $Dataset->addPoint('Norway', 3); $Dataset->addPoint('Sweden', 8); $Dataset->addPoint('Finland', 5); $Plot =& $Plotarea->addNew('bar', &$Dataset); $Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/axis_direction.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/axis_direction.php +++ pear/Image_Graph/docs/examples/axis_direction.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Axis direction * * Other: * None specific * * $Id: axis_direction.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; // create the graph $Graph =& Image_Graph::factory('graph', array(600, 300)); // add a TrueType font $Font =& $Graph->addNew('font', 'Verdana'); // set the font size to 11 pixels $Font->setSize(10); $Graph->setFont($Font); // setup the plotarea, legend and their layout $Graph->add( Image_Graph::vertical( Image_Graph::factory('title', array('Changing Axis Direction', 12)), Image_Graph::horizontal( $Plotarea1 = Image_Graph::factory('plotarea'), $Plotarea2 = Image_Graph::factory('plotarea'), 50 ), 5 ) ); $Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); $Plot1 =& $Plotarea1->addNew('line', array(&$Dataset)); $Plot1->setLineColor('red'); $Plot2 =& $Plotarea2->addNew('line', array(&$Dataset)); $Plot2->setLineColor('red'); $AxisY =& $Plotarea2->getAxis('y'); $AxisY->setInverted(true); // output the Graph $Graph->done(); ?>
http://cvs.php.net/diff.php/pear/Image_Graph/docs/examples/misc01.php?r1=1.4&r2=1.5&ty=u Index: pear/Image_Graph/docs/examples/misc01.php diff -u pear/Image_Graph/docs/examples/misc01.php:1.4 pear/Image_Graph/docs/examples/misc01.php:1.5 --- pear/Image_Graph/docs/examples/misc01.php:1.4 Wed Aug 3 17:21:52 2005 +++ pear/Image_Graph/docs/examples/misc01.php Fri Sep 30 14:59:17 2005 @@ -9,7 +9,7 @@ * One legend for many plotareas, Plotarea customizations, Fillarray usage, * Datapreprocessor, Axis customizations * - * $Id: misc01.php,v 1.4 2005/08/03 21:21:52 nosey Exp $ + * $Id: misc01.php,v 1.5 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> @@ -144,6 +144,8 @@ // use the data label array on the X axis $AxisX->setDataPreprocessor($ArrayData); $AxisX->setFontAngle('vertical'); +$AxisX->setAxisIntersection('max'); +$AxisX->setLabelOption('position', 'inside'); $Plotarea_BarAndLine->setAxisPadding(array('left' => 20, 'right' => 20)); http://cvs.php.net/diff.php/pear/Image_Graph/docs/ChangeLog?r1=1.40&r2=1.41&ty=u Index: pear/Image_Graph/docs/ChangeLog diff -u pear/Image_Graph/docs/ChangeLog:1.40 pear/Image_Graph/docs/ChangeLog:1.41 --- pear/Image_Graph/docs/ChangeLog:1.40 Wed Sep 14 16:27:24 2005 +++ pear/Image_Graph/docs/ChangeLog Fri Sep 30 14:59:18 2005 @@ -1,16 +1,27 @@ ************************* Image_Graph - Changelog ************************* -Version x.y.z-alpha [2005-xxx-xx] - Jesper Veggerby <pear.nosey@veggerby.dk> +Version 0.7.0-alpha [2005-Sep-30] - Jesper Veggerby <pear.nosey@veggerby.dk> * Added Image_Graph_Plot_Odo (thanks Maxime Delorme) * Added Image_Graph_DataSelector_Values (thanks Paolo) * Added best-fit line plot (Image_Graph_Plot_Fit_Line) + * Added possibility to specify the pie plot diameter * Modified Image_Graph_Plot_CandleStick, it is now only necessary to specify 'open' for first point (other 'open' = previous 'close') + * Changed Image_Graph_Plotarea::hideAxis() to actually hide the axis, not remove them + * Added Image_Graph_Plotarea::clearAxis() to remove the axis * Fixed markers so that y values equal to null never shows markers * Fixed problem in Image_Graph_Plot_BoxWhisker causing an undefined method * Fixed problem with markers and horizontal plots * Fixed problem with axis not showing arrow-ends even if enabled * Fixed problem with an error "Call to a member function on a non-object..." in Common.php + * Fixed a problem with Image_Graph_Dataset_Trivial when supplying a datarray as constructor parameter and Image_Graph_Fill_Array + * Fixed Bug #5421 "Documentation for Image_Graph constructor wrong" + * Fixed Bug #5502 "Axis_Logarithmic::setAxisIntersection('max') is broken" + * Fixed Bug #5504 "PHP Notice: Undefined index: tohtml" + * Fixed PHP notice with Image_Graph::done() when using output to file + * Fixed so it is possible to use array(R, G, B, a?) as fill color + * Fixed issue with markers not rotating along with plot when using setStartingAngle() + * Fixed trivial dataset so that it is possible to use 'id' as key when populating dataset in constructor Version 0.6.0-alpha [2005-Aug-27] - Jesper Veggerby <pear.nosey@veggerby.dk> * Added possibility to set starting angle of pie chart (at which angle does the first pieslice start) and the direction of the pies (clockwise or counter-clockwise) http://cvs.php.net/diff.php/pear/Image_Graph/docs/README?r1=1.14&r2=1.15&ty=u Index: pear/Image_Graph/docs/README diff -u pear/Image_Graph/docs/README:1.14 pear/Image_Graph/docs/README:1.15 --- pear/Image_Graph/docs/README:1.14 Sat Aug 27 13:27:32 2005 +++ pear/Image_Graph/docs/README Fri Sep 30 14:59:18 2005 @@ -1,7 +1,7 @@ ******************************* Image_Graph ******************************* - version 0.6.0-alpha + version 0.8.0-alpha ------ CopyRight (C) Jesper Veggerby Hansen, 2003-2005 ------ http://pear.php.net/package/Image_Graph @@ -74,11 +74,16 @@ Documentation ------------- -See http://pear.php.net/package/Image_Graph/docs for documentation +See http://pear.php.net/package/Image_Graph/docs for API documentation + +See http://wiki.veggerby.dk/doku.php?id=image_graph for End-User documentation + +See http://pear.veggerby.dk/ for samples History ------- Release history of Image_Graph/GraPHPite (see also ChangeLog for changes) +0.7.0 30-Sep-2005 0.6.0 27-Aug-2005 0.5.0 08-Aug-2005 (First release using Image_Canvas) 0.4.0 24-May-2005 http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Legend.php?r1=1.14&r2=1.15&ty=u Index: pear/Image_Graph/Graph/Legend.php diff -u pear/Image_Graph/Graph/Legend.php:1.14 pear/Image_Graph/Graph/Legend.php:1.15 --- pear/Image_Graph/Graph/Legend.php:1.14 Wed Aug 24 16:35:56 2005 +++ pear/Image_Graph/Graph/Legend.php Fri Sep 30 14:59:18 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Legend.php,v 1.14 2005/08/24 20:35:56 nosey Exp $ + * @version CVS: $Id: Legend.php,v 1.15 2005/09/30 18:59:18 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -118,7 +118,8 @@ * @return array Default parameter array * @access private */ - function _parameterArray($simulate = false) { + function _parameterArray($simulate = false) + { $param['left'] = $this->_left + $this->_padding; $param['top'] = $this->_top + $this->_padding; $param['right'] = $this->_right - $this->_padding; http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Plot.php?r1=1.17&r2=1.18&ty=u Index: pear/Image_Graph/Graph/Plot.php diff -u pear/Image_Graph/Graph/Plot.php:1.17 pear/Image_Graph/Graph/Plot.php:1.18 --- pear/Image_Graph/Graph/Plot.php:1.17 Thu Sep 8 15:02:18 2005 +++ pear/Image_Graph/Graph/Plot.php Fri Sep 30 14:59:19 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Plot.php,v 1.17 2005/09/08 19:02:18 nosey Exp $ + * @version CVS: $Id: Plot.php,v 1.18 2005/09/30 18:59:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -763,7 +763,7 @@ $width = 20 + $param['width'] + $this->_canvas->textWidth($caption); $param['maxwidth'] = max($param['maxwidth'], $width); $x2 = $param['x'] + $width; - $y2 = $param['y'] + $param['height']+5; + $y2 = $param['y'] + $param['height'] + 5; if ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) && ($y2 > $param['bottom'])) { $param['y'] = $param['top']; http://cvs.php.net/diff.php/pear/Image_Graph/Graph/Plot/Odo.php?r1=1.1&r2=1.2&ty=u Index: pear/Image_Graph/Graph/Plot/Odo.php diff -u pear/Image_Graph/Graph/Plot/Odo.php:1.1 pear/Image_Graph/Graph/Plot/Odo.php:1.2 --- pear/Image_Graph/Graph/Plot/Odo.php:1.1 Tue Aug 30 17:25:24 2005 +++ pear/Image_Graph/Graph/Plot/Odo.php Fri Sep 30 14:59:19 2005 @@ -24,7 +24,7 @@ * @author Jesper Veggerby <pear.nosey@veggerby.dk> * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Odo.php,v 1.1 2005/08/30 21:25:24 nosey Exp $ + * @version CVS: $Id: Odo.php,v 1.2 2005/09/30 18:59:19 nosey Exp $ * @link http://pear.php.net/package/Image_Graph */ @@ -360,7 +360,8 @@ * * @access private */ - function _drawAxis(){ + function _drawAxis() + { //draw outline $this->_getLineStyle(); $this->_canvas->pieslice( @@ -579,7 +580,8 @@ * * @access private */ - function _drawRange(){ + function _drawRange() + { if($this->_range){ $radius0 = $this->_radius * (1 - $this->_radiusPercent/100); foreach ($this->_range as $range) { http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/log_axis_intersect.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/log_axis_intersect.php +++ pear/Image_Graph/docs/examples/log_axis_intersect.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Demonstrate logarithmic axis * * Other: * Matrix layout, Axis titles * * $Id: log_axis_intersect.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; require_once 'Image/Canvas.php'; $Canvas =& Image_Canvas::factory('png', array('width' => 600, 'height' => 400, 'antialias' => true)); // create the graph $Graph =& Image_Graph::factory('graph', $Canvas); // add a TrueType font $Font =& $Graph->addNew('font', 'Verdana'); // set the font size to 15 pixels $Font->setSize(8); // add a title using the created font for ($i = 0; $i < 2; $i++) { for ($j = 0; $j < 2; $j++) { $Axis['X'][($i*2+$j)] = 'axis' . ($i % 2 == 0 ? '' : '_log'); $Axis['Y'][($i*2+$j)] = 'axis' . ($j % 2 == 0 ? '' : '_log'); } } for ($i = 0; $i < 4; $i++) { $Plotarea[$i] =& Image_Graph::factory('plotarea', array($Axis['X'][$i], $Axis['Y'][$i])); } $Graph->setFont($Font); // create the plotarea $Graph->add( Image_Graph::vertical( Image_Graph::factory('title', array('Logarithmic Axis', 11)), Image_Graph::vertical( Image_Graph::horizontal( Image_Graph::vertical( Image_Graph::factory('title', array('Normal Y-Axis', array('size' => 10, 'angle' => 90))), Image_Graph::factory('title', array('Logarithmic Y-Axis', array('size' => 10, 'angle' => 90))) ), Image_Graph::horizontal( Image_Graph::vertical( Image_Graph::factory('title', array('Normal X-Axis', 10)), Image_Graph::vertical( $Plotarea[0], $Plotarea[1] ), 7 ), Image_Graph::vertical( Image_Graph::factory('Image_Graph_Title', array('Logarithmic X-Axis', 10)), Image_Graph::vertical( $Plotarea[2], $Plotarea[3] ), 7 ) ), 4 ), $Legend = Image_Graph::factory('Image_Graph_Legend'), 92 ), 5 ) ); $Legend->setPlotarea($Plotarea[0]); $Dataset = Image_Graph::factory('dataset'); $i = 1; while ($i <= 10) { $Dataset->addPoint($i, $i*$i); $i++; } for ($i = 0; $i < 4; $i++) { $Plotarea[$i]->addNew('line_grid', false, IMAGE_GRAPH_AXIS_X); $Plotarea[$i]->addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y); if ($i % 2 == 1) { $Axis =& $Plotarea[$i]->getAxis(IMAGE_GRAPH_AXIS_Y); $Axis->setLabelInterval(array(1, 2, 3, 5, 10, 20, 30, 50, 100)); } $AxisX =& $Plotarea[$i]->getAxis(IMAGE_GRAPH_AXIS_X); $AxisX->setAxisIntersection('max'); $Plot =& $Plotarea[$i]->addNew('line', array(&$Dataset)); $Plot->setLineColor('red'); $Plot->setTitle("x^2"); } $Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/double_category_axis.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/double_category_axis.php +++ pear/Image_Graph/docs/examples/double_category_axis.php <?php /** * Usage example for Image_Graph. * * Main purpose: * PDF canvas * * Other: * Datapreprocessor, Axis markers * * $Id: double_category_axis.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; // create the graph $Graph =& Image_Graph::factory('graph', array(400, 300)); // add a TrueType font $Font =& $Graph->addNew('ttf_font', 'Verdana'); // set the font size to 11 pixels $Font->setSize(7); $Graph->setFont($Font); // create the plotarea $Graph->add( Image_Graph::vertical( Image_Graph::factory('title', array('Testing Category Axis', 10)), $Plotarea = Image_Graph::factory('plotarea', array('Image_Graph_Axis_Category', 'Image_Graph_Axis_Category')), 5 ) ); $DS =& Image_Graph::factory('dataset'); $DS->addPoint('Apache', 'Open Source'); $DS->addPoint('BSD', 'Open Source'); $DS->addPoint('Linux', 'Open Source'); $DS->addPoint('Microsoft', 'Proprietary'); $DS->addPoint('Micro', 'Proprietary'); $DS->addPoint('Minisoft', 'Proprie'); $DS->addPoint('Millisoft', 'Prop'); $DS2 =& Image_Graph::factory('dataset'); $DS->addPoint('Apache', 'Open Source'); $DS->addPoint('BSD', 'Open Source'); $DS->addPoint('Linux', 'Open Source'); $DS->addPoint('Microsoft', 'Proprietary'); $DS->addPoint('Micro', 'Proprietary'); $DS->addPoint('Minisoft', 'Proprie'); $DS->addPoint('Miniority', 'Proprias'); $Plot =& $Plotarea->addNew('scatter', $DS); //$Plot->setLineColor('red'); $Plot2 =& $Plotarea->addNew('scatter', $DS2); $Marker =& Image_Graph::factory('Image_Graph_Marker_Cross'); $Marker->setFillColor('blue'); $Marker->setLineColor('black'); $Plot->setMarker($Marker); $Marker =& Image_Graph::factory('Image_Graph_Marker_Cross'); $Marker->setFillColor('red'); $Marker->setLineColor('black'); $Plot2->setMarker($Marker); $Graph->done(); //$DS =& Image_Graph::factory('dataset'); //$DS->addPoint('Germany', 'England'); //$DS->addPoint('Denmark', 'France'); //$DS->addPoint('Sweden', 'Denmark'); //$DS->addPoint('England', 'France'); //$DS->addPoint('Norway', 'Finland'); //$DS->addPoint('Denmark', 'Finland'); //$DS->addPoint('Iceland', 'Germany'); //$DS->addPoint('Norway', 'France'); // //$DS2 =& Image_Graph::factory('dataset'); //$DS2->addPoint('Sweden', 'France'); //$DS2->addPoint('Austria', 'Germany'); //$DS2->addPoint('Norway', 'Holland'); //$DS2->addPoint('Denmark', 'Germany'); //$DS2->addPoint('Sweden', 'Holland'); //$DS2->addPoint('Iceland', 'Denmark'); // //$Plot =& $Plotarea->addNew('scatter', $DS); //$Marker =& Image_Graph::factory('Image_Graph_Marker_Cross'); //$Marker->setFillColor('blue'); //$Marker->setLineColor('black'); //$Plot->setMarker($Marker); // //$Plot2 =& $Plotarea->addNew('scatter', $DS2); //$Marker2 =& Image_Graph::factory('Image_Graph_Marker_Plus'); //$Marker2->setFillColor('yellow'); //$Marker2->setLineColor('black'); //$Plot2->setMarker($Marker2); // //$Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/small_pie_plot.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/small_pie_plot.php +++ pear/Image_Graph/docs/examples/small_pie_plot.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Show pie chart * * Other: * None specific * * $Id: small_pie_plot.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; // create the graph $Graph =& Image_Graph::factory('graph', array(80, 80)); // add a TrueType font $Font =& $Graph->addNew('font', 'Verdana'); // set the font size to 11 pixels $Font->setSize(8); $Graph->setFont($Font); // create the plotareas $Plotarea =& $Graph->addNew('plotarea'); $Plotarea->hideAxis(); // create the dataset $Dataset =& Image_Graph::factory('random', array(10, 10, 20, true)); // create the 1st plot as smoothed area chart using the 1st dataset $Plot =& $Plotarea->addNew('Image_Graph_Plot_Pie', $Dataset); $Plot->setDiameter(-1); $Plotarea->setPadding(0); // set a line color $Plot->setLineColor('gray'); // set a standard fill style $FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); $Plot->setFillStyle($FillArray); $FillArray->addColor('green@0.2'); $FillArray->addColor('blue@0.2'); $FillArray->addColor('yellow@0.2'); $FillArray->addColor('red@0.2'); $FillArray->addColor('orange@0.2'); $Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/plot_pie_rotate.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/plot_pie_rotate.php +++ pear/Image_Graph/docs/examples/plot_pie_rotate.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Demonstrate radial gradient fillings * * Other: * None specific * * $Id: plot_pie_rotate.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; // create the graph $Graph =& Image_Graph::factory('graph', array(400, 300)); // add a TrueType font $Font =& $Graph->addNew('font', 'Verdana'); // set the font size to 7 pixels $Font->setSize(7); $Graph->setFont($Font); // create the plotarea $Graph->add( Image_Graph::vertical( Image_Graph::factory('title', array('Meat Export', 12)), Image_Graph::horizontal( $Plotarea = Image_Graph::factory('plotarea'), $Legend = Image_Graph::factory('legend'), 70 ), 5 ) ); $Legend->setPlotarea($Plotarea); // create the 1st dataset $Dataset1 =& Image_Graph::factory('dataset'); $Dataset1->addPoint('Beef', rand(1, 10)); $Dataset1->addPoint('Pork', rand(1, 10)); $Dataset1->addPoint('Poultry', rand(1, 10)); $Dataset1->addPoint('Camels', rand(1, 10)); $Dataset1->addPoint('Other', rand(1, 10)); // create the 1st plot as smoothed area chart using the 1st dataset $Plot =& $Plotarea->addNew('pie', array(&$Dataset1)); $Plotarea->hideAxis(); // create a Y data value marker $Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_PCT_Y_TOTAL); // create a pin-point marker type $PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker)); // and use the marker on the 1st plot $Plot->setMarker($PointingMarker); // format value marker labels as percentage values $Marker->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%')); $Plot->Radius = 2; $FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); $Plot->setFillStyle($FillArray); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'green')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'blue')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'yellow')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'red')); $FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'orange')); $Plot->explode(5); $Plot->setStartingAngle(90); // output the Graph $Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/simple.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/simple.php +++ pear/Image_Graph/docs/examples/simple.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Datapreprocessing usage and idea * * Other: * Matrix layout * * $Id: simple.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ error_reporting(E_ALL); include 'Image/Graph.php'; $Graph =& Image_Graph::factory('graph', array(400, 300)); $Plotarea =& $Graph->addNew('plotarea'); $Dataset =& Image_Graph::factory('dataset'); $Dataset->addPoint('Denmark', 10); $Dataset->addPoint('Norway', 3); $Dataset->addPoint('Sweden', 8); $Dataset->addPoint('Finland', 5); $Plot =& $Plotarea->addNew('bar', &$Dataset); $Graph->done(); ?> http://cvs.php.net/co.php/pear/Image_Graph/docs/examples/axis_direction.php?r=1.1&p=1 Index: pear/Image_Graph/docs/examples/axis_direction.php +++ pear/Image_Graph/docs/examples/axis_direction.php <?php /** * Usage example for Image_Graph. * * Main purpose: * Axis direction * * Other: * None specific * * $Id: axis_direction.php,v 1.1 2005/09/30 18:59:17 nosey Exp $ * * @package Image_Graph * @author Jesper Veggerby <pear.nosey@veggerby.dk> */ require_once 'Image/Graph.php'; // create the graph $Graph =& Image_Graph::factory('graph', array(600, 300)); // add a TrueType font $Font =& $Graph->addNew('font', 'Verdana'); // set the font size to 11 pixels $Font->setSize(10); $Graph->setFont($Font); // setup the plotarea, legend and their layout $Graph->add( Image_Graph::vertical( Image_Graph::factory('title', array('Changing Axis Direction', 12)), Image_Graph::horizontal( $Plotarea1 = Image_Graph::factory('plotarea'), $Plotarea2 = Image_Graph::factory('plotarea'), 50 ), 5 ) ); $Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); $Plot1 =& $Plotarea1->addNew('line', array(&$Dataset)); $Plot1->setLineColor('red'); $Plot2 =& $Plotarea2->addNew('line', array(&$Dataset)); $Plot2->setLineColor('red'); $AxisY =& $Plotarea2->getAxis('y'); $AxisY->setInverted(true); // output the Graph $Graph->done(); ?>