Core-Plot学习一 基本对象、添加库
2015-06-24 11:34
351 查看
首先看一下整体的绘图区域划分:
View Code
Axes :
坐标轴
配置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
-(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
相关文章推荐
- lambda function
- lambda function
- eclipse导入Java web项目,项目名出现红叉而其他地方没有红叉的问题解决方法
- mips寄存器
- diamond专题(二)-- 核心原理介绍
- Leetcode.Longest Common Prefix
- 内存管理机制 Thread 1:EXC_BAD_ACCESS(code=EXC_I386_GPFLT)错误
- WPF中的窗体Show()和ShowDialog()区别
- MongoDB 进程控制系列二:结束进程
- php浮点型以及精度问题
- android布局属性
- 抽象工厂模式
- ecshop查询搜索记录最多的前10条
- linux shell 导出mongodb 数据库 & 导出 mysql数据库
- MYSQL远程连接解决办法
- 连接时出现:Can't open display: localhost:10.0
- MySQL学习系列2:数据类型宽度/查看字段长度
- TCP/IP和socket
- openstack中Nova组件images的所有python API 汇总
- dedecms列表页文章有图调用缩略图 无图留空或自定义图片的方法!