http://grokbase.com/p/r/r-help/1169gqdxcs/r-ggplot2-histogram-with-density-curve
# If you want it on the count scale, that is trickier and requires
# knowing (setting) the binwidth and keeping that value in sync in
# two places.
# In this example, the binwidth is 0.2 (set in geom_histogram and
On 6/7/2011 8:08 AM, wwreith wrote:
I am learning ggplot2 commands and I have figured out how to create
histograms and density curves but I am not sure how to add a density curve
on top of a histogram.
Here are the two graphs that I created.
## Histogram
t<-rnorm(500)
w<-qplot(t, main="Normal R
I am learning ggplot2 commands and I have figured out how to create
histograms and density curves but I am not sure how to add a density curve
on top of a histogram.
Here are the two graphs that I created.
## Histogram
t<-rnorm(500)
w<-qplot(t, main="Normal Random Sample", fill=I("blue"), colou
3 matches
Mail list logo