R Exploratory Data Analysis探索性数据分析基础部分
2016-09-08 02:00
507 查看
Principles of Analytic Graphics 分析图表的原则
1、Show Comparisons 显示对比
2、Show causality,mechanism,explanation,systematic structure
显示因果关系,结构,解释,系统结构
3、Show multivariate data 显示多元数据(在图表中引用多维度)
4、Integration of evidence 证据整合(用各种model表现)
5、Describe and document the evidence with appropriate labels,scales,sources,etc
用合适的标签、计量单位、来源,阐述和说明证据
6、Content is king 内容为王
----------------------------------------------------------------
exploratory graphs 探索性图表
1维
summary() 6数概括
boxplot(x,col);abline(h,v,lwd) 箱图;基准线
hist(x,col,breaks);rug() 直方图;地毯图
barplot(x,col,main) 条形图
2维
boxplot(y~x,data,col) 箱图
par(mfrow,mar);hist(subset(x)$1,col) 分屏显示直方图
plot(x$1,x$2);abline(h,lwd,lty) 带基准线的散点图
resources网站资源
R Graph Gallery
R Bloggers
---------------------------------------------------------------------
绘图系统
1、base 艺术家的调色板
2、lattice 一次性作图 适合制作3D图和分组分析
3、ggplot2 以上的结合"grammar of graphics"
---------
4000
-------------------------------------------------------------
base:绘图
1、plot() 基础绘图
hist(airquality$Ozone)直方图
boxplot(Ozone~Month,airquality)箱图
main 标题
type="n" 建立绘图区域,但不绘图
2、par() 参数
par()$pin查看某项参数
pch 绘图符号 example(plot)
lty 线条格式
lwd 线宽
col 颜色
xlab x轴标签
ylab y轴标签
las 轴位置
bg 背景颜色
mar 边距 下左上右
oma 外边距
mfrow mfcol 每行图表数量
3、lines() 线条
4、points() 点
col
5、text() 文本
6、title() 标题
mian
7、mtext() 边距文本
8、axis() 轴标、标签
9、legend() 图例
pch 符号
col 颜色
legend 图例名称
10、abline() 基准线
v h lwd lty
--------------------------------------------------
lattice
xyplot(Life.Exp~Income|region,state,layout=c(2,2))
bwplot
-------------------------------------------------
图片输出
?Devices 查看当前环境下可输出的方式
dev.off()
dev.cur()查找当前输出端
dev.set(2)
dev.copy()
dec.copy2pdf
----------------------------------------------------------
输出类型
矢量图good for line drawings and plots with solid colors using a modest number of points
pdf("x.pdf") 建立pdf输出端
svg web格式支持交互
win.metafile Windows专用
postscript pdf前身
位图good for plots with a large number of points, natural scenes or web-based plots
png 大量点线图
jpeg 色彩丰富的图
tiff 旧的
bmp windoes专用
3、ggplot2 以上的结合"grammar of graphics"
1、Show Comparisons 显示对比
2、Show causality,mechanism,explanation,systematic structure
显示因果关系,结构,解释,系统结构
3、Show multivariate data 显示多元数据(在图表中引用多维度)
4、Integration of evidence 证据整合(用各种model表现)
5、Describe and document the evidence with appropriate labels,scales,sources,etc
用合适的标签、计量单位、来源,阐述和说明证据
6、Content is king 内容为王
----------------------------------------------------------------
exploratory graphs 探索性图表
1维
summary() 6数概括
boxplot(x,col);abline(h,v,lwd) 箱图;基准线
hist(x,col,breaks);rug() 直方图;地毯图
barplot(x,col,main) 条形图
2维
boxplot(y~x,data,col) 箱图
par(mfrow,mar);hist(subset(x)$1,col) 分屏显示直方图
plot(x$1,x$2);abline(h,lwd,lty) 带基准线的散点图
resources网站资源
R Graph Gallery
R Bloggers
---------------------------------------------------------------------
绘图系统
1、base 艺术家的调色板
2、lattice 一次性作图 适合制作3D图和分组分析
3、ggplot2 以上的结合"grammar of graphics"
---------
4000
-------------------------------------------------------------
base:绘图
1、plot() 基础绘图
hist(airquality$Ozone)直方图
boxplot(Ozone~Month,airquality)箱图
main 标题
type="n" 建立绘图区域,但不绘图
2、par() 参数
par()$pin查看某项参数
pch 绘图符号 example(plot)
lty 线条格式
lwd 线宽
col 颜色
xlab x轴标签
ylab y轴标签
las 轴位置
bg 背景颜色
mar 边距 下左上右
oma 外边距
mfrow mfcol 每行图表数量
3、lines() 线条
4、points() 点
col
5、text() 文本
6、title() 标题
mian
7、mtext() 边距文本
8、axis() 轴标、标签
9、legend() 图例
pch 符号
col 颜色
legend 图例名称
10、abline() 基准线
v h lwd lty
--------------------------------------------------
lattice
xyplot(Life.Exp~Income|region,state,layout=c(2,2))
bwplot
-------------------------------------------------
图片输出
?Devices 查看当前环境下可输出的方式
dev.off()
dev.cur()查找当前输出端
dev.set(2)
dev.copy()
dec.copy2pdf
----------------------------------------------------------
输出类型
矢量图good for line drawings and plots with solid colors using a modest number of points
pdf("x.pdf") 建立pdf输出端
svg web格式支持交互
win.metafile Windows专用
postscript pdf前身
位图good for plots with a large number of points, natural scenes or web-based plots
png 大量点线图
jpeg 色彩丰富的图
tiff 旧的
bmp windoes专用
3、ggplot2 以上的结合"grammar of graphics"
相关文章推荐
- 【Python-ML】探索式数据分析EDA(Exploratory Data Analysis)
- 实时数据分析Real-time data analysis frameworks (or stream system)
- 微阵列数据分析(Microarray Data Analysis)
- 微阵列数据分析(Microarray Data Analysis)
- 大数据数据分析云模型 Big Data Analysis Cloud(MapReduce) Model
- Python 探索性数据分析(Exploratory Data Analysis,EDA)
- 利用Python进行数据分析(8) pandas基础: Series和DataFrame的基本操作
- Exploratory Analysis of Spatial and Temporal Data: A Systematic Approach
- osworkflow基础入门部分汇总(基本概念,包用途分析及代码片断,表结构分析,主要优势,核心概念)
- 数据绑定以及Container.DataItem的具体分析
- 数据绑定以及Container.DataItem的具体分析
- 数据绑定以及Container.DataItem的具体分析
- ScottGu之博客翻译-第6部分-用存储过程检索数据-LINQ to SQL (Part 6 - Retrieving Data Using Stored Procedures)
- 数据绑定以及Container.DataItem的具体分析
- 数据绑定以及Container.DataItem几种方式与用法分析
- 数据绑定以及Container.DataItem的具体分析
- 数据绑定以及Container.DataItem的具体分析
- 基础数据部分终于完成了
- 编程基础:深入分析Java中的数据结构
- 数据绑定以及Container.DataItem的具体分析(转贴)