预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共52页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

R语言绘图2343.画图面板分割mar=c(a,b,c,d):设置plotregion与figureregion底部、 左边、上部、右边的距离,单位英寸。 mai=c(a,b,c,d):设置plotregion与figureregion底部、 左边、上部、右边的距离,单位是文本行数。 mgp=c(a,b,c):三个坐标轴成分的位置,轴文本标记、单位记号标记和轴位置与轴线距离;单位是文本行。 par(mgp=c(1.6,0.6,0),mar=c(3,3,2,1)) X=1:10;Y=1:10 cex_type=c(0.7,0.8,0.9,1,2,3,4,5,6,7) plot(X,Y,col="blue",pch=16, cex=cex_type,#绘图符号大小,1是正常大小 cex.axis=1.1,#坐标轴刻度数字大小 cex.lab=1.2,#坐标轴标签大小 cex.main=1.4,#标题文字大小 #cex.sub=1.3,#副标题文字大小 font.axis=3,#坐标轴刻度数字字体,斜体 font.lab=2,#坐标轴标签字体,粗体 font.main=4,#标题字体,粗斜体 #font.sub=1,#副标题字体,正常 main="字体", xlim=c(1,12),ylim=c(1,12)) text(X,Y,adj=0,labels=paste("cex=",cex_type),col="red",cex=1.2,font=3)R的绘图符号: par(mgp=c(1.6,0.6,0),mar=c(3,3,2,1)) pch_type=c(1:5,15:19) X=1:10;Y=rep(6,10) plot(X,Y,col=1,pch=pch_type,cex=2,main="pch",font.lab=2) text(X,Y,adj=-0.5,labels=paste("pch=",pch_type),srt=90)颜色名称:white,black,red,yellow,… colors() 数字代号:1,2,3,4,5,6,7,8 颜色函数:rainbow,heat.colors,terrain.colors,topo.colors,cm.colors,colors()par(mgp=c(1.6,0.6,0),mar=c(3,3,2,1)) pch_type=c(1:5,15:19) X=1:10;Y=rep(6,10) plot(X,Y,col=1:10,pch=pch_type,cex=2,main="pch",font.lab=2) text(X,Y,col=1:10,adj=-0.5,labels=paste("pch=",pch_type), srt=90)par(mgp=c(1.6,0.6,0),mar=c(3,3,2,1)) X=1:10;Y=1:10 line_type=c(1:6) line_width=seq(from=0.6,by=0.6,length=6) plot(X,Y,col="blue",pch=16,type="n",main="linetypeandlinewidth",font.lab=2,cex.lab=1.2) abline(h=3:8,lty=line_type,col=colors()[120:126],lwd=line_width) text(3:8,3:8,adj=0,labels=paste("lty=",line_type,",lwd=",line_width),col="red",cex=1.2,font=3)3031