Reputation: 81
I used ggplot()
and geom-line()
as follows
ggplot(tabla3) + geom_line(aes(tabla3$MC, tabla3$Normal), lwd = 1)
But I want it to look like this:
Upvotes: 2
Views: 958
Reputation: 176
If you know the mean and standard deviation of your data, why not just plot a normal distribution?
x <- seq(50, 90, length=101)
hx <- dnorm(x, mean(x), sd(x))
plot(x, hx, type = 'l')
ggplot version
ggplot(data = tibble(x), aes(x)) +
stat_function(fun = dnorm, n = 101, args = list(mean = mean(x), sd = sd(x))) + ylab("") +
scale_y_continuous(breaks = NULL)
Upvotes: 1