我想添加一条曲线,它的 x 和 y 坐标已经定义到直方图。考虑下面的直方图:
set.seed(38593)
expRandom <- rexp(10000)
x <- seq(from = 0.05, to = 10, by = 0.001)
y <- exp(-x)
### Now I'd like to first draw my histogram and then
### add my plot(x,y) to my existing histogram:
hist(expRandom, freq = FALSE)
### ?? How to add my plot(x,y) to my histogram above?
谢谢,