2
我有這個ggplot情節正態分佈到現有的情節
ggplot(data = ph, aes(x = index1)) + geom_density()
,我想補充一個正態分佈,均值相等的(= 2.71)
和標準偏差(= 0.61)
。
我創建的正態分佈:
nd1 <- rnorm(n = 100000, mean = 2.71), sd = 0.61)
nd1plot <- qplot(nd1, geom = "density") + theme_classic() + ggtitle("Normalverteilung")
但現在我不知道如何將它添加到現有的情節。任何人都可以幫我解決這個問題嗎?
請使用SO格式化並提供數據例如 – timat
對不起......我不知道這是如何制定出... –
[這個答案](http://stackoverflow.com/a/ 29182589/2461552)可能會讓你開始。 – aosmith