Reputation: 55
I have a histogram and a curve and want to draw them on a single chart. how can i do this?
hist(rexp(n, 3))
curve(dnorm, from=0, to=1, n)
Upvotes: 0
Views: 91
Reputation: 628
Add curve 'add=TRUE'.
hist(rexp(n, 3))
curve(dnorm, from=0, to=1, n,add=TRUE)
Upvotes: 1