kaiserfarrell / core-plot

Automatically exported from code.google.com/p/core-plot
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Problem in method scaleToFitPlots when there are only one plot and the Y values are always the same. #482

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.Create a scatter plot (iOS);

2.Add only one plot to plotspace, and fill It with the values below:
X=0, Y=50
X=1, Y=50
X=2, Y=50
X=3, Y=50

3.The resulting Y range will be always 0,0 to 1,0, because the 
unionYRange.length equals 0 in method scaleToFitPlots:(NSArray *)plots.

What is the expected output? What do you see instead?
One horizontal line pointing the value 50 in Y axis, 4 times.
But I can't see the line, because the YRange needed to be around 50 and It's 
not.

What version of the product are you using? On what operating system?
CorePlot 1.1 - MacOSX MountainLion.

Please provide any additional information below.

I think the problem is around here (method scaleToFitPlots, in 
CPTXYPlotSpace.m):

....
....
// Set range
    NSDecimal zero = CPTDecimalFromInteger(0);
    if ( unionXRange && !CPTDecimalEquals(unionXRange.length, zero) ) {
        self.xRange = unionXRange;
    }
    if ( unionYRange && !CPTDecimalEquals(unionYRange.length, zero) ) {
        self.yRange = unionYRange; <-- the debugger never stops here, because de length equals zero... 
    }
....
....

Call me if you need more info.

Thanks,
Almir

Original issue reported on code.google.com by almir....@gmail.com on 5 Dec 2012 at 5:23

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 6 Dec 2012 at 12:11

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 276f4358734c.

Original comment by eskr...@mac.com on 22 Dec 2012 at 12:08