Re: [R] Overlay Histogram

2012-08-08 Thread baptiste auguie
>>>>> opts(title="Normal Random Sample") + >>>>> coord_flip() >>>>> >>>>> # From StackOverflow >>>>> http://stackoverflow.com/questions/9490482/combined-plot-of-ggplot2-not-in-a-single-plot-using-par-or-layout-f

Re: [R] Overlay Histogram

2012-08-08 Thread Peter Ehlers
ushViewport(viewport(layout = grid.layout(2, 1))) print(p1, vp = vplayout(1, 1)) print(p2, vp = vplayout(2, 1)) John Kane Kingston ON Canada -Original Message- From: hannah@gmail.com Sent: Mon, 6 Aug 2012 15:40:55 -0400 To: r-help@r-project.org Subject: [R] Overlay Histogram De

Re: [R] Overlay Histogram

2012-08-08 Thread li li
;) + >>>> coord_flip() >>>> >>>> # From StackOverflow >>>> http://stackoverflow.com/questions/9490482/combined-plot-of-ggplot2-not-in-a-single-plot-using-par-or-layout-functio >>>> >>>> # this simplifies the vp statemen

Re: [R] Overlay Histogram

2012-08-07 Thread John Kane
From: hannah....@gmail.com > Sent: Mon, 6 Aug 2012 15:40:55 -0400 > To: r-help@r-project.org > Subject: [R] Overlay Histogram > > Dear all, > For two sets of random variables, say, x <- rnorm(1000, 10, 10) and y > <- rnorm(1000. 3, 20). > Is there any way to over

Re: [R] Overlay Histogram

2012-08-07 Thread li li
Thanks a lot. Hannah 2012/8/6 R. Michael Weylandt > See > > example(layout) > > for one idea. I think you might also want to look into rug plots. > > Best, > Michael > > On Mon, Aug 6, 2012 at 2:40 PM, li li wrote: > > Dear all, > > For two sets of random variables, say, x <- rnorm(1000,

Re: [R] Overlay Histogram

2012-08-06 Thread arun
-help Cc: Sent: Monday, August 6, 2012 3:40 PM Subject: [R] Overlay Histogram Dear all,   For two sets of random variables, say, x <-  rnorm(1000, 10, 10) and  y <- rnorm(1000. 3, 20). Is there any way to overlay the histograms (and density curves) of x and y on the plot of y vs. x? The his

Re: [R] Overlay Histogram

2012-08-06 Thread R. Michael Weylandt
See example(layout) for one idea. I think you might also want to look into rug plots. Best, Michael On Mon, Aug 6, 2012 at 2:40 PM, li li wrote: > Dear all, > For two sets of random variables, say, x <- rnorm(1000, 10, 10) and y > <- rnorm(1000. 3, 20). > Is there any way to overlay the hi

[R] Overlay Histogram

2012-08-06 Thread li li
Dear all, For two sets of random variables, say, x <- rnorm(1000, 10, 10) and y <- rnorm(1000. 3, 20). Is there any way to overlay the histograms (and density curves) of x and y on the plot of y vs. x? The histogram of x is on the x axis and that of y is on the y axis. The density curve here