I am trying to use Scatter Graph in one of my project using the CorePlot library. I was able to achieve a good result from it as well but something went wrong, and I am sure that I have nothing to do with because I have not changed the code after that. This is how the plot is looking now:

and the expandRangeByFactor values that I am setting are:
CPTMutablePlotRange *xRange = [plotSpace.xRange mutableCopy];
[xRange expandRangeByFactor:CPTDecimalFromCGFloat(350.3f)];
plotSpace.xRange = xRange;
CPTMutablePlotRange *yRange = [plotSpace.yRange mutableCopy];
[yRange expandRangeByFactor:CPTDecimalFromCGFloat(8.3f)];
plotSpace.yRange = yRange;
I have no idea what is happening wrong here because by looking at the values, it should not be like this.
Need urgent help on this.
The
-expandRangeByFactor:method multiplies the length of the range by the given factor. It adjusts the range location to keep the center of the range in the same place. You are using rather large factors. For example, if your starting x-range has a length of one day, the expanded range will be almost one year long.