[R] Overlay Histogram
R. Michael Weylandt
michael.weylandt at gmail.com
Mon Aug 6 22:29:28 CEST 2012
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 <hannah.hlx at gmail.com> 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 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 is to approximate the shape of the distribution
> and does not have to have area 1.
> Thank you in advance.
> Hannah
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
More information about the R-help
mailing list