0

I'm trying to plot a histogram with a normal curve overlay and all I get is a red line for the normal curve. Any ideas what's happening?

ggplot(data.frame, aes(data.frame$colunm)) + geom_histogram(bins = 150) 
+ stat_function(fun = dnorm, colour = "red", 
args = list(mean = 134.7093, sd = 555.3832)) + scale_y_sqrt() +scale_x_log10()

enter image description here

989
  • 12,579
  • 5
  • 31
  • 53
user5987132
  • 55
  • 1
  • 1
  • 7
  • 1
    Considering that the max of `dnorm` is around 0.4, it's not terribly surprising it looks like a flat line when viewed at that scale. Try multiplying by 100. – IRTFM May 31 '16 at 21:57
  • 2
    Possible dupe: http://stackoverflow.com/q/5688082/903061 – Gregor Thomas May 31 '16 at 22:10

0 Answers0