Re: [R] how to plot the histogram and the curve in the same graph

2008-10-21 Thread Greg Snow
It is not clear what curve you want to plot, but this code may help get you started (the final plot will probably need the x and y limits expanded and maybe other options changed): x <- rnorm(100, rep( c(100,105), c(75,25)), 2 ) hist(x, probability=TRUE) lines( density(x), col='green' ) curve(

Re: [R] how to plot the histogram and the curve in the same graph

2008-10-21 Thread Rubén Roa-Ureta
leo_wa wrote: i want to plot the histogram and the curve in the same graph.if i have a set of data ,i plot the histogram and also want to see what distribution it was.So i want to plot the curve to know what distribution it like. To draw the curve and the distribution you should have an ide

Re: [R] how to plot the histogram and the curve in the same graph

2008-10-21 Thread matthieu dubois
leo_wa hotmail.com> writes: > > > i want to plot the histogram and the curve in the same graph.if i have a set > of data ,i plot the histogram and also want to see what distribution it > was.So i want to plot the curve to know what distribution it like. You will find below an example using on

Re: [R] how to plot the histogram and the curve in the same graph

2008-10-20 Thread Dieter Menne
leo_wa hotmail.com> writes: > > i want to plot the histogram and the curve in the same graph.if i have a > set of data ,i plot the histogram and also want to see what distribution > it was.So i want to plot the curve to know what distribution it like. See the example under histogram/lattice