Hi, Does anybody encounter the same problem when we overlap histogram and density that the density line seem to shift to the right a little bit? If you do have the same problem, what should we do to correct that? Thank you. par(mar=c(4,4,2,1.2),oma=c(0,0,0,0)) hist(datobs,prob=TRUE, main ="Volume of a catchment from four stations",col="yellowgreen", cex.axis=1, xlab="rainfall",ylab="Relative frequency", ylim= c(0,.003), xlim=c(0,1200)) lines(density(dd), lwd=3,col="red") #legend("topright",c("observed","generated"),lty=c(0,1),fill=c("blue",""),bty="n")
legend("topright", legend = c("observed","generated"), col = c("yellowgreen", "red"), pch=c(15,NA), lty = c(0, 1), lwd=c(0,3),bty="n", pt.cex=2) box() Thank you. [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.