【问题标题】:layout and outer margins布局和外边距
【发布时间】:2019-01-28 09:52:04
【问题描述】:

layout函数是否忽略了par设置的外边距参数?我在讲义中读到了。但我认为这是不对的。

以下是我的解释:

par(oma = rep(4, 4))
layout(matrix(1:4, 2, 2))
layout.show(4)

有人对此有进一步的见解吗?

【问题讨论】:

  • 在您的示例中应该是什么样子?

标签: r plot graphics


【解决方案1】:

?layout 的文档中给出了以下警告:

这些函数与在设备上安排绘图的其他机制完全不兼容:par(mfrow)par(mfcol)split.screen

这并不意味着您不能将oma 中的parlayout 结合使用来设置外边距。这仅意味着您只能使用 (1) mfrow/mfcol、(2) layout 或 (3) splitscreen 之一。

此外,您还可以查看 mfrowmfcolsplitscreen 的文档以获取更多信息。

这有什么帮助吗?

【讨论】:

    猜你喜欢
    • 2020-10-07
    • 2020-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-10
    • 1970-01-01
    • 2013-01-02
    • 1970-01-01
    相关资源
    最近更新 更多