您的位置:首页 > 其它

Core-Plot学习一 基本对象、添加库

2015-06-24 11:34 351 查看
首先看一下整体的绘图区域划分:

-(CGPoint)plotAreaViewPointForPlotPoint:(NSDecimal *)plotPoint;
-(CGPoint)plotAreaViewPointForDoublePrecisionPlotPoint:(doubledouble *)plotPoint;
-(void)plotPoint:(NSDecimal *)plotPoint forPlotAreaViewPoint:(CGPoint)point;
-(void)doublePrecisionPlotPoint:(doubledouble *)plotPoint forPlotAreaViewPoint:(CGPoint)point;


View Code

Plots :

Plot就是一个数据在图表中的表现形式,比如条形,柱状型等,

CPTPlot的dataSource
方法

@protocol CPTPlotDataSource <NSObject>

-(NSUInteger)numberOfRecords;

@optional

// Implement one of the following
-(NSArray *)numbersForPlot:(CPTPlot *)plot field:(NSUInteger)fieldEnum recordIndexRange:(NSRange)indexRange;
-(NSNumber *)numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index;

@end


Axes :

坐标轴

CPTAxis
CPTPlotSpace
有密切关系,
CPTXYAxisSet
包含多个
CPTAxis
CPTAxis
中的标签元素可以自定义的。

配置Core-Plot库

1.在工程中添加 Core Plot 库

2.添加依赖库QuartzCore.framework

3.设置编译环境,在 build setting 中查找 other linker flags,添加 '-all_load -ObjC' 标志

corePlot好的博客: http://m.blog.csdn.net/blog/lushuoan/41791513
          http://m.blog.csdn.net/blog/lushuoan/41790641
          http://m.blog.csdn.net/blog/lushuoan/41699455

          http://m.blog.csdn.net/blog/lushuoan/39477813

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: