1
我正在使用函數truehist在同一圖中創建兩個圖。 如何將boxplot函數放入truehist直方圖並將它們一起可視化?R中的truehist函數
box <- ggplot(n_walmart.csv,aes(x=TotalWages),color = "Yellow",ylab ="Wages")
boxplot <- box + geom_boxplot() + coord_flip()
truehist(n_walmart.csv$TotalWages,nbins=20,prob = TRUE,col = 5,
xlab = "Magnitude",
ylab = "Frequency")
'par(mfrow = c(2,1))'? –