[R] barplot with a probability density curve

Olga Lyashevska olga at herenstraat.nl
Sun Mar 14 22:32:52 CET 2010


Dear all, 

I am making a barplot as following:

barplot(c(1,2,3,5,2,3,1),names.arg=c("100","200","300","400","500","600","700"),xlab="diameter",ylab="flow",main="some title",space=0.1)

I am also trying to add a probability density curve, however using
lines(density(c(1,2,3,5,2,3,1))) does not give a desired result.

Any tips?
Thanks

Olga



More information about the R-help mailing list