2015-05-11 61 views
1

我想在R中的同一個窗口中打印多個直方圖。我正在使用R Studio。我只能使用內置的圖形包。我一直無法在這裏找到解決我的問題的方法。使用圖形在同一個面板中顯示多個直方圖R

我想創建虹膜數據集的直方圖。

例如:

一個直方圖萼片寬度,另一個用於萼片長度,等等。

謝謝!

+0

結帳['mfrow'](https://www.google.se/search?q=mfrow&client = ubuntu&hs = hg&channel = fs&source = lnms&tbm = isch&sa = X&ei = gLJQVem6D6XpywPQ3YDICQ&ved = 0CAcQ_AUoAQ&biw = 1920&bih = 1105)或['layout'](http://stackoverflow.com/questions/11198767/how-to-annotate-across-or-間圖式,多積板,在-R)。 – Backlin

回答

0

正如上面Backlin評論的,則可以使用par()功能和mfrow選項來控制副區:

par(mfrow=c(2,2)) 

hist(iris$Sepal.Width) 
hist(iris$Sepal.Length) 
hist(iris$Petal.Width) 
hist(iris$Petal.Length) 
相關問題