How To Avoid Density Curve Getting Cut Off In Plot
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 4 years ago . I am working on an assignment using R and the fitted density curve that is overlaid on the histogram is cut off at it's peak. Example: x <- rexp(1000, 0.2) hist(x, prob = TRUE) lines(density(x), col = "blue", lty = 3, lwd = 2) I have done a search on the internet for this but didn't find anything addressing this problem. I have tried playing with the margins, but that doesn't