Re: [R] How to plot Histogram with frequence overlaid by distribution curve

2004-03-04 Thread Rolf Turner
You wrote: > I am having a new problem that how I can set the probability scale > from 0 to 1 when I using on probability scale. Sometimes I get the > maximum probabilty more than 100%. When you set prob=TRUE you get a ***density*** scale. The resulting histogram represents a probability densit

Re: [R] How to plot Histogram with frequence overlaid by distribution curve

2004-03-03 Thread WeiQiang . Li
Hi, I am having a new problem that how I can set the probability scale from 0 to 1 when I using on probability scale. Sometimes I get the maximum probabilty more than 100%. Thanks! Best Regards, WeiQiang In response to a posting from WeiQiang Li: > Hi, > I am facing the problem th

Re: [R] How to plot Histogram with frequence overlaid by distribution curve

2004-03-01 Thread Duncan Murdoch
On Mon, 1 Mar 2004 09:43:09 -0400 (AST), you wrote: >What WeiQiang Li proposes to do makes >no sense at all, and will simply confuse and mislead the viewer/reader. >If a histogram is to be overlaid with a density curve that histogram >should represent a density and hence should be plotted on the de

Re: [R] How to plot Histogram with frequence overlaid by distribution curve

2004-03-01 Thread Rolf Turner
Spencer Graves wrote: > ?truehist in library(MASS)? > > library(MASS) > truehist(samp) > x <- seq(-8.5, -6, length=51) > lines(x, dnorm(x, mean(samp), sqrt(var(samp > This just worked for me in both S-Plus 6.2 and R 1.8.1. What's wrong with ``hist(samp,prob=TRUE)''? > hope this he

Re: [R] How to plot Histogram with frequence overlaid by distribution curve

2004-03-01 Thread Spencer Graves
?truehist in library(MASS)? library(MASS) truehist(samp) x <- seq(-8.5, -6, length=51) lines(x, dnorm(x, mean(samp), sqrt(var(samp This just worked for me in both S-Plus 6.2 and R 1.8.1. hope this helps. spencer graves Rolf Turner wrote: In response to a posting from WeiQiang Li: Hi

[R] How to plot Histogram with frequence overlaid by distribution curve

2004-03-01 Thread Rolf Turner
In response to a posting from WeiQiang Li: > Hi, > I am facing the problem that I want to plot a histogram chart set > freq to true and overlay with normal or weibull or exponential distribution > curve. > > The sample code is shown as below: > >samp<-c(-8.2262,-8.2262,-8.2262,-8.20209,-8.09294,

RE: [R] How to plot Histogram with frequence overlaid by distribution curve

2004-03-01 Thread Gabor Grothendieck
histdata <- hist(samp,freq=TRUE,br=20) curve(max(histdata$count)*dnorm(x,mean=mean(samp),sd=sd(samp)),add=TRUE) --- Date: Mon, 1 Mar 2004 17:18:12 +0800 From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: [R] How to plot Histogram with frequence overlaid by dis

[R] How to plot Histogram with frequence overlaid by distribution curve

2004-03-01 Thread WeiQiang . Li
Hi, I am facing the problem that I want to plot a histogram chart set freq to true and overlay with normal or weibull or exponential distribution curve. The sample code is shown as below: >samp<-c(-8.2262,-8.2262,-8.2262,-8.20209,-8.09294,-8.07321,-8.07321, -8.07321,-8.0717