>>>>> 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
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
;) +
>>>> 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
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
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,
-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
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
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
8 matches
Mail list logo