其他分享
首页 > 其他分享> > R语言中基础绘图函数 par(mar)选项的作用

R语言中基础绘图函数 par(mar)选项的作用

作者:互联网

 

001、par(mar)选项的作用是调整绘图区域距离外围框线的距离。作用和par(mai)一样, 可能只是单位不一样.

par(mfrow = c(2, 2))

par(mar = c(1, 1, 1, 1)) 
plot(1:10, main = "mar = 1", cex.main = 3)
box(which = "figure", lwd = 5)
box(which = "plot", lwd = 5)

par(mar = c(3, 3, 3, 3)) 
plot(1:10, main = "mar = 3", cex.main = 3)
box(which = "figure", lwd = 5)
box(which = "plot", lwd = 5)

par(mar = c(5, 5, 5, 5)) 
plot(1:10, main = "mar = 5", cex.main = 3)
box(which = "figure", lwd = 5)
box(which = "plot", lwd = 5)

par(mar = c(7, 7, 7, 7)) 
plot(1:10, main = "mar = 7", cex.main = 3)
box(which = "figure", lwd = 5)
box(which = "plot", lwd = 5)

 

 

标签:box,plot,par,mar,绘图,main,lwd
来源: https://www.cnblogs.com/liujiaxin2018/p/16284329.html