density plot shows fringes between points (R ggplot2) -



density plot shows fringes between points (R ggplot2) -

hi density plot shows fringes/dips between points when there several points, see picture:

http://www.imagesup.net/?di=3141413124212

# show fringes test = as.data.frame( sample(0:5,1000,replace=t) ) colnames(test) = c('mon') ggplot(test, aes(x=mon)) + geom_density(binwidth=1, size=1) # normal test = as.data.frame( sample(0:20,1000,replace=t) ) colnames(test) = c('mon') ggplot(test, aes(x=mon)) + geom_density(binwidth=1, size=1)

anybody know how prepare it?

try changing adjust= parameter alter bandwidth used estimate density: ggplot(test, aes(x=mon)) + geom_density(binwidth=1, size=1, adjust=2). ?stat_density help page suggets, check out parameters density

r ggplot2 probability-density

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -