【发布时间】:2020-09-20 06:15:15
【问题描述】:
我正在尝试在此图上添加均值和 3 sd 作为标签;我已经尝试过“How to plot a normal distribution by labeling specific parts of the x-axis?”,但是那里的解决方案不起作用,因为我有 1000 个观察值。我不能去 label = c(0, 1, 2...mean...500, 501...750) 并且也没有添加三个标准差标签的解决方案。这是情节:
这是我当前的代码:
x = seq(0, 750, length = 1000)
y <- dnorm(x, mean = 435, sd = 72)
plot(x, y,
type = 'p',
lwd = 1,
col = 'red',
main = "Standard Normal Distribution with Mean 435 and SD 72",
xlab = "Score",
ylab = "Frequency"
)
【问题讨论】: