Coreplot Lot Area Range - iOS
I am trying to find a scatter plot whose range depends on the resulting value. This self.xAxisMinimum variable takes the first value of the received data. However, when I run my program, it reads so that when self.xAxisMinimum = 4688, plotspace.range starts at 5000. Below are the graph settings.
CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace *)self.graph.defaultPlotSpace;
plotSpace.xRange = [CPTPlotRange
plotRangeWithLocation:CPTDecimalFromFloat(self.xAxisMinimum - 100) length:CPTDecimalFromFloat(60*60)];
plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(yAxisMin) length:CPTDecimalFromFloat(yAxisMax - yAxisMin)];
Is this related to the long interval length? I have a long interval of 180 seconds. Below is the code for the Xaxis-set parameters.
axisSet.xAxis.title = @"Time(per sec)";
axisSet.xAxis.titleTextStyle = textStyle;
axisSet.xAxis.axisLineStyle = lineStyle;
axisSet.xAxis.titleOffset = 30.0f;
axisSet.xAxis.majorTickLineStyle = lineStyle;
axisSet.xAxis.minorTickLineStyle = lineStyle;
axisSet.xAxis.majorGridLineStyle = lineStyle;
axisSet.xAxis.minorGridLineStyle=gridStyle;
axisSet.xAxis.labelOffset = 6.0f;
axisSet.xAxis.majorIntervalLength = CPTDecimalFromFloat(180.0f);
axisSet.xAxis.minorTicksPerInterval = 5;
axisSet.xAxis.minorTickLength = 0.50f;
axisSet.xAxis.majorTickLength = 0.50f;
axisSet.xAxis.labelTextStyle = textStyle;
axisSet.xAxis.labelFormatter = formatter;
So, for this setup, I had to have an x-axis starting at (4688-100), not 5000. Anyone have an idea why? thanks in advance
+3
source to share