Reputation: 12051
In CorePlot
I have a graph that looks like this in iOS5
:
and like this in iOS6
:
As you can see it is getting misplaced a lot. The code I use for positioning it stays the same:
graph.plotAreaFrame.paddingTop = 20.0;
graph.plotAreaFrame.paddingRight = 0.0;
graph.plotAreaFrame.paddingBottom = 0.0;
graph.plotAreaFrame.paddingLeft = 0.0;
[plotSpace scaleToFitPlots:[NSArray arrayWithObjects:plot01, plot02, nil]];
CPTMutablePlotRange *xRange = [plotSpace.xRange mutableCopy];
[xRange expandRangeByFactor:CPTDecimalFromCGFloat(1.4f)];
plotSpace.xRange = xRange;
CPTMutablePlotRange *yRange = [plotSpace.yRange mutableCopy];
[yRange expandRangeByFactor:CPTDecimalFromCGFloat(1.6f)];
plotSpace.yRange = yRange;
x.gridLinesRange = yRange;
y.gridLinesRange = xRange;
Any ideas on why this is happening? I'm really stuck here, tried chaining the values here and there but the result stays the same.
I'm using the latest version of Core Plot which is 1.1
and Xcode 4.6
Upvotes: 1
Views: 302
Reputation: 27381
This was a known issue with Core Plot 1.1. It's fixed in the latest code, but there hasn't been another full release since then. You can pull the latest code from Google Code with Mercurial to get the fix.
Upvotes: 1