Menu

#10 drawGrid problems with scatter

open
nobody
None
5
2008-10-14
2008-09-25
No

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.

Discussion

  • Jean-Damien POGOLOTTI

    • status: open --> pending
     
  • Jean-Damien POGOLOTTI

    I've added your fix in my staging box. This will be visible in the next minor.

    Many thanks..!
    JD.

     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    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).

     
  • Dylan Nelson

    Dylan Nelson - 2008-10-14
    • status: closed --> open
     
  • Dylan Nelson

    Dylan Nelson - 2008-10-14

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

     

Log in to post a comment.

MongoDB Logo MongoDB