||
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 ) # 设置为红色加粗
实例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 ) # 设置为红色加粗
实例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")
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-1-1 08:27
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社