分享

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

 geoallan 2022-12-22 发布于四川

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)
复制代码

 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多