liupeng23的个人博客分享 http://blog.sciencenet.cn/u/liupeng23

博文

[转载]R语言绘制QQ图

已有 5538 次阅读 2019-5-26 22:53 |系统分类:科研笔记|文章来源:转载

R语言绘制QQ图

https://www.jianshu.com/p/4c5a6dc44dda

https://blog.csdn.net/lph188/article/details/84501229

https://baijiahao.baidu.com/s?id=1607953668948239544&wfr=spider&for=pc

https://www.cnblogs.com/malt927/p/6055249.html

https://www.cnblogs.com/xudongliang/p/6741843.html

https://www.jianshu.com/p/213088700ad9

http://www.biye5u.com/article/r/2018/6381.html

https://jingyan.baidu.com/article/48b37f8d333c961a65648849.html

https://wenku.baidu.com/view/5a89acfb650e52ea541898ab.html

https://wklchris.github.io/R-plotting-basic.html

https://www.cnblogs.com/ltolstar/p/5575196.html

https://blog.csdn.net/jeffery0207/article/details/80167461

https://www.cnblogs.com/haoyijing/p/6044967.html

https://www.cnblogs.com/JackieZhu/p/4190450.html

https://www.cnblogs.com/jackjoin/p/8847820.html

https://blog.csdn.net/biocity/article/details/82980904

https://toypipi.github.io/2017/02/28/R语言绘图/

http://www.360doc.com/content/18/1230/16/51784026_805477606.shtml



实例1:

#############加载数据

data<-as.matrix(X02)   #把数据改成csv格式导入到R语言里再把它转换成矩阵

R<-X02[,2]

R=apply(R,2,as.numeric)  

#R语言将字符串矩阵转化为数值型矩阵,apply()函数里面的第2个值,如果为1,则修改的为行,如果

取2则表示修改的为列

qqnorm(R, main = "QQ图",  xlab = "理论分位数", ylab = "样本分为数",pch = 19)

qqline(R, col=2, lwd=2 )  # 设置为红色加粗

Rplot.bmp

实例2:

data<-as.matrix(X02)   #把数据改成csv格式导入到R语言里再把它转换成矩阵

t<-X02[,1]

R<-X02[,2]

R=apply(R,2,as.numeric)  

split.screen(c(2,2)) #分屏幕为左右两边

screen(1) #屏幕1预备输出

qqnorm(R, main = "QQ图",  xlab = "理论分位数", ylab = "样本分为数",pch = 19)

qqline(R, col=2, lwd=2 )  # 设置为红色加粗

screen(2) #屏幕1预备输出

P<-X02[,3]

P=apply(P,2,as.numeric)

qqnorm(P, main = "QQ图",  xlab = "理论分位数", ylab = "样本分为数",pch = 19)

qqline(P, col=2, lwd=2 )  # 设置为红色加粗

screen(3) #屏幕1预备输出

T<-X02[,4]

T=apply(T,2,as.numeric)

qqnorm(T, main = "QQ图",  xlab = "理论分位数", ylab = "样本分为数",pch = 19)

qqline(T, col=2, lwd=2 )  # 设置为红色加粗

screen(4) #屏幕1预备输出

NAO<-X02[,5]

NAO=apply(NAO,2,as.numeric)

qqnorm(NAO, main = "QQ图",  xlab = "理论分位数", ylab = "样本分为数",pch = 19)

qqline(NAO, col=2, lwd=2 )  # 设置为红色加粗

Rplot01.bmp

实例3:

data<-as.matrix(X02)   #把数据改成csv格式导入到R语言里再把它转换成矩阵

R<-X02[,2]

R=apply(R,2,as.numeric)  

P<-X02[,3]

P=apply(P,2,as.numeric)

T<-X02[,4]

T=apply(T,2,as.numeric)

NAO<-X02[,4]

NAO=apply(NAO,2,as.numeric)

qqnorm(R)

qqline(R)

par(new=TRUE)

qqnorm(P,col="green",xaxt="n",yaxt="n")

qqline(P,col="green")

par(new=TRUE)

qqnorm(T,col="blue",xaxt="n",yaxt="n")

qqline(T,col="blue")

par(new=TRUE)

qqnorm(NAO,col="red",xaxt="n",yaxt="n")

qqline(NAO,col="red")

Rplot.bmp





https://wap.sciencenet.cn/blog-3306552-1181342.html

上一篇:[转载]m_map学习资源(matlab)
下一篇:[转载]开始学习python数据处理+绘图

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2021-10-26 17:50

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部