histogram

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

Adding a boxplot to a histogram

No votes yet

This person wondered if it was possible to add a small boxplot in a histogram, like where the legend might be.

Read more

Syndicate content