我是R的新人。我绘制了一个正态分布的直方图,但正常分布的线在顶部被切割。我该如何解决?
代码是下一个:
> d=read.csv("d.csv")
> d=d$d
> hist(d, freq = F,
+ ylab = "Casualities",
+ xlab = "Meters", main = "")
>
> curve(dnorm(x, mean(d), sd(d)),
+ col = "blue", lwd = 3, add = TRUE)
图表看起来像这样:
我已经在hist函数中尝试了ylim = 350000,如下所示:
hist(d, freq = F,
+ ylab = "Casualities",
+ xlab = "Meters", main = "", ylim=350000)
结果如下: