[R] Overlay Histogram
arun
smartpink111 at yahoo.com
Mon Aug 6 22:07:15 CEST 2012
HI,
#These links
http://stackoverflow.com/questions/8545035/scatterplot-with-marginal-histograms-in-ggplot2
http://stackoverflow.com/questions/11022675/rotate-histogram-in-r-or-overlay-a-density-in-a-barplot
# might be helpful for you.
A.K.
----- Original Message -----
From: li li <hannah.hlx at gmail.com>
To: r-help <r-help at r-project.org>
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 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