I just took an example which produces four plots combined with the layout
function. However, I cannot figure out how the matrix inside layout()
connects to the layout of these plots.
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.