[R] ggplot2 Histogram with density curve

2014-03-12 Thread Trochelman, Jacob (GE Aviation, US)
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

Re: [R] ggplot2 Histogram with density curve

2011-06-09 Thread Brian Diggs
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

[R] ggplot2 Histogram with density curve

2011-06-07 Thread wwreith
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