我有这个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")
但是我现在不知道如何将其添加到我的现有图表中。有人能帮我解决这个问题吗?