How can I replicate the folllowing plot using ggplot?
library(kde1d)
set.seed(100)
x=sample(1000,100)
fit <- kde1d(x,bw = 92)
plot(NULL, xlim = c(0, 1000), ylim = c(0, 1), axes = TRUE,
xlab = "Value",
ylab = expression("Probability"))
curve(pkde1d(x, fit),
add = TRUE, col = "black", lwd = 1.5)
Thank you