drawGrid problems with scatter
Status: Beta
Brought to you by:
ayashisunyday
When doing scatter plots with autoscaling (no calls to setFixedScale) drawGrid calculates for vertical lines wrong. It uses something related to
$ColCount = $this->DataCount;
a fix is instead, right above the for($i=1;$i<=$ColCount;$i++) line, use:
$ColCount = floor( ($this->GArea_X2 - $this->GArea_X1) / $this->DivisionWidth );
Can see the effect and result in the documentation scatterplot example if you remove the setFixedScale command.
I've added your fix in my staging box. This will be visible in the next minor.
Many thanks..!
JD.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
The fix in 1.27d is incomplete, it should be:
/* Vertical lines */
if ( $this->GAreaXOffset == 0 )
$XPos = $this->GArea_X1 + $this->DivisionWidth + $this->GAreaXOffset;
else
$XPos = $this->GArea_X1 + $this->GAreaXOffset;
$ColCount = floor( ($this->GArea_X2 - $this->GArea_X1) / $this->DivisionWidth );