这是图形的屏幕截图... 在此图中,y 轴的最小值为 0(原点),最大值为 700。 我想将最小值设置为 500,将最大值设置为 700。
如何实现?? 任何帮助将不胜感激。
最佳答案
有两个步骤,
1. Setting the orthogonalCoordinateDecimal, this is the point where your graph starts
CPTXYAxis *y = axisSet.yAxis;
y.orthogonalCoordinateDecimal = CPTDecimalFromFloat(500.0);
2. Setting the plotRange, this is to determine where should the graph start and its range
CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace *)graph.defaultPlotSpace;
plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:500 length:200];
关于iphone - 在核心图中配置轴,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12475336/