I have set the plotspace with X and Y Ranges but still I get to see the negative axes. Thoughts anyone?
// Setup scatter plot space
CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace *)graph.defaultPlotSpace;
plotSpace.allowsUserInteraction = YES;
plotSpace.delegate = self;
plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:[NSNumber numberWithFloat:0.0] length:[NSNumber numberWithInt:2]];
plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:[NSNumber numberWithFloat:0.0] length:[NSNumber numberWithInt:2]];
Please check the image to see how it looks
[![enter image description here][2]][2]
I was able to achieve the solution just by setting the visible ranges for both the axis.
x.visibleRange = [CPTPlotRange plotRangeWithLocation:xMin length:[NSNumber numberWithDouble:([xMax doubleValue] - [xMin doubleValue])]];
y.visibleRange = [CPTPlotRange plotRangeWithLocation:yMin length:[NSNumber numberWithDouble:([yMax doubleValue] - [yMin doubleValue])]];