
I am using coreplot to render graphs on my mobile application as per the attached image. My problem is the graph sometimes doesn't scale well for the y-axis labels. From the graph it is quite evident that the max y-axis label is 3500.0 BUT the actual y-axis maximum value in both the graphs plot points is ONLY 2498. This results in wastage of space from the plots maximum point to the y-axis label's maximum point thereby shrinking my graph. This does not happen with all my graphs but only a few graphs. Ideally, I would expect the y-axis max label to have been set to 3000. OR even better, if there is way to have the maximum y-axis label shown as 2498 instead of 3500 that would be wonderful.
Here is how I set my y-axis range:
plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(yMin) length:CPTDecimalFromFloat(yMax)];
ymin = 1159.000000 and ymax = 2498.000000 //For this example
I've tried to use "scaletoFitPlots" but in vain. I only want the y-axis labels to be scalded properly and NOT the x-axis labels. I've also referred to a few threads on stack overflow such as this - CorePlot - Set y-Axis range to include all data points but in vain :(. I really appreciate some help here.
Follow up question:


If you see the final two graphs, one of them is completely within the major grid line of the y-axis wheres the other is not within, i.e., the max y-axis label is 200000.0 and the maximum value of a plot is above that. Is there a way I can make all my graphs to fall within the major grid line for the maximum value of a y-axis label?