【发布时间】:2016-08-07 04:23:00
【问题描述】:
我只是举了一个例子,它产生了四个与layout 函数相结合的图。但是,我无法弄清楚layout() 中的矩阵如何连接到这些图的布局。
layout(matrix(c(1, 1, 1,
2, 3, 4,
2, 3, 4), nr=3, byrow=T))
hist(rnorm(25), col="VioletRed")
hist(rnorm(25), col="VioletRed")
hist(rnorm(25), col="VioletRed")
hist(rnorm(25), col="VioletRed")
【问题讨论】:
-
根据
?layout,layout divides the device up into as many rows and columns as there are in matrix mat, with the column-widths and the row-heights specified in the respective arguments. -
这里是一个 3*3 的矩阵,并且有一个包含四个图的图形。那么这些数字是如何与地块对应的呢?
-
我所知道的对其功能的最佳解释位于YaRrr! Pirate’s Guide to R。一旦解释了基本推理,docs 就突然变得有意义了。