PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Images » Image_Graph » Bug #5415

Axis's wrong when plot is Dot/Scatter

Details

Submitted2005-09-15 15:14 UTC
Fromjames dot kilbride at gd-ais dot com
Assignednosey
StatusClosed
PackageImage_Graph
PHP Version5.0.5
OSRed Hat Linux 7.3
Roadmaps(Not assigned)

Comments

[2005-09-15 15:14 UTC] james dot kilbride at gd-ais dot com

Description:
------------
The axis do not seem to be putting values in the correct locations on the axis, causing overlaps of values making the axis unreadable. This happens on both the X and Y axis. There are no errors in the log file.

Test script:
---------------
Change test file category.php near end to read:

...
* which they exist "before" in the dataset on their first occurence)
*/

$Plot =& $Plotarea->addNew('scatter', $DS);

$Marker =& Image_Graph::factory('Image_Graph_Marker_Cross');
$Marker->setFillColor('blue');
$Marker->setLineColor('black');
// set a line color
$Plot->setMarker($Marker);
$Graph->done();

Expected result:
----------------
I expect the axis to be well ordered without gaps and no overlapping.

Actual result:
--------------
Odd gaps are formed and there is overlapping displays of text which makes it unreadable and useless.

[2005-09-15 17:57 UTC] james dot kilbride at gd-ais dot com

This is not purely a 1 plot issue. I can provide you with code that has dual plots(both scatters) which reproduces the issues. I'll put togethor a data set that does it. I have a suspicion it has something to do with the datasets themselves and how the axis are created from the data sets.

[2005-09-15 18:08 UTC] james dot kilbride at gd-ais dot com

Change data set in category.php to:

$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');

And change plot code to:

$Plot =& $Plotarea->addNew('scatter', $DS);
//$Plot->setLineColor('red');

$Plot2 =& $Plotarea->addNew('scatter', $DS2);
//$Plot2->setLineColor('blue');
$Marker =& Image_Graph::factory('Image_Graph_Marker_Cross');

$Marker->setFillColor('blue');

$Marker->setLineColor('black');

// set a line color

$Plot->setMarker($Marker);
$Marker =& Image_Graph::factory('Image_Graph_Marker_Cross');

$Marker->setFillColor('red');

$Marker->setLineColor('black');

// set a line color

$Plot2->setMarker($Marker);
$Graph->done();

This duplicates the problem with 2 plots.