1) par()函數的使用
par(mfcol=c(2,3)) 是將介面分為2*3 個繪圖區域即是 2行3列 而
mfcol 中的col是按照列優先的順序進行填充。
那麼mfrow就是以行優先的順序進行映像填充。
以下是測試的代碼集合圖片
hist(rnorm(25),col="red",main="red")hist(rnorm(19),col="green",main="b")hist(rnorm(50),col="blue",main="c")hist(rnorm(60),col="pink",main="d")```2)layout()函數 layout()函數有一個優點:可以指定圖片的位置<div class="se-preview-section-delimiter"></div>```layout(matrix(c(2,3,4,1),nr=2,byrow=T)) hist(rnorm(25),col="red",main="a") hist(rnorm(25),col="blue",main="b") hist(rnorm(25),col="pink",main="c") hist(rnorm(25),col="green",main="d")
hist(rnorm(25),col="red",main="a") hist(rnorm(25),col="blue",main="b") hist(rnorm(25),col="pink",main="c") hist(rnorm(25),col="green",main="d")
3)split.screen()
split.screen(c(3,2))的意思是可以將介面分為3行兩列的格式,可以使3*2張圖形在同一個介面出現
這裡寫代碼片