I am using Line Graph of Core Plot in my project. The thing is when I kept the data of my X-axis and Y-axis like: 1,2,3....10, everything worked fine. But now the data is like: X-axis: 0, 150, 500.... and on Y-axis: 0,1000,2000 and so on.
So now my graph is not fully visible in the given area. I know it is because the range on my Y-axis is getting too high and it is not visible. Some code that might possibly the reason for it:
// Setup scatter plot space
CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace *)graph.defaultPlotSpace;
plotSpace.allowsUserInteraction = YES;
plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromInteger(0.0) length:CPTDecimalFromInteger(8)];
plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromInteger(0.0) length:CPTDecimalFromInteger(5)];
// Restrict y range to a global range
CPTPlotRange *globalYRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(-2.5)
length:CPTDecimalFromDouble(5.0)];
plotSpace.globalYRange = globalYRange;
CPTPlotRange *globalXRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(-0.2)
length:CPTDecimalFromDouble(17.0)];
plotSpace.globalXRange=globalXRange;