curve

Density curve plotted over a histogram

No votes yet

Sometimes it's useful to plot a density curve over a histogram to help identify the distribution, or demonstrate the deviation between sample distributions and proposed population distributions:

data <- rnorm(1000)
hist(data, freq=FALSE)
curve(dnorm, add=TRUE)

Read more

Gradient under a curve

No votes yet

This question was posed on the R-help mailing list: I would like to fill the area under a curve with a gradient of colors. Are there any packages or trick I could use?

Vladimir recommended the poster to look at the following link:

http://www.stat.auckland.ac.nz/~ihaka/Graphics/index.html

describing what Ross Ihaka, co-founder of R, has been up to of late relating to R. He's using gradients to create "really snazzy presentation graphics".

However, being an EDA snob, I have a bit of a problem with this.

Read more

Syndicate content