# barplot with a probability density curve

8 messages
Open this post in threaded view
|

## barplot with a probability density curve

 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 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: barplot with a probability density curve

 Hi Olga, may be you can work around with the suggestions below, while other provide the best solution for your: 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) lines(lowess(c(1,2,3,5,2,3,1),f=1), type="b", lwd=2, lty=3, col="blue") cheers milton On Sun, Mar 14, 2010 at 5:32 PM, Olga Lyashevska <[hidden email]>wrote: > 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 > > ______________________________________________ > [hidden email] 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. >         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: barplot with a probability density curve

Open this post in threaded view
|

## Re: barplot with a probability density curve

 On 15/03/2010, at 3:07 PM, S Ellison wrote (in response to a very confused question about superimposing density curves on barplots):         > So the bad news is that not a lot of what you're doing is right.         Sounds like a fortune to me! :-)         cheers,                 Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}} ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: barplot with a probability density curve

 In reply to this post by olga30dec I begin to think that R needs a _mis_fortunes package... Steve E >>> Rolf Turner <[hidden email]> 03/15/10 2:21 AM >>> On 15/03/2010, at 3:07 PM, S Ellison wrote (in response to a very confused question about superimposing density curves on barplots):         > So the bad news is that not a lot of what you're doing is right.         Sounds like a fortune to me! :-)         cheers, ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}} ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: barplot with a probability density curve

 In reply to this post by olga30dec On 15/03/2010, at 3:37 PM, S Ellison wrote: > I begin to think that R needs a _mis_fortunes package... I am tempted to nominate *that* as a fortune! :-)         cheers,                 Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}} ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.