iphone - 在核心图中配置轴

标签 iphone ios core-plot

这是图形的屏幕截图... 在此图中,y 轴的最小值为 0(原点),最大值为 700。 我想将最小值设置为 500,将最大值设置为 700。 here is the graph

如何实现?? 任何帮助将不胜感激。

最佳答案

有两个步骤,

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/

相关文章:

iphone - 子类化 UIToolbar 的正确方法

ios - 核心运动中的陀螺仪更新

ios - Coreplot 图例带有标题、国家/地区标签,并在 swift 的那一行下面

支持移动点的iOS库(折线图)

iphone - 关于 iOS 应用程序的复杂设计问题

c++ - 在 iPhone 上使用 C++ 中的 Unicode 的最佳方式是什么?

iphone - AVAudioRecorder文件太大

iphone - coreplot :Converted coordinates, 有问题。 [plotSpaceplotPoint:plotPoint forPlotAreaViewPoint:point];

iphone - 如何在 ActionScript 3 中将图片/图像从 iPhone 上传到 App?

ios - 使用 "Boxing"样式的多重绑定(bind)和处置