Plot a pdf and shade a section of it.
1 2 3 |
func |
The density function to be plotted (dnorm, dt, df) |
xlim |
The x-limits for the plotting region |
ylim |
The y-limits for the plotting region. If left as NULL then it will automatically use a reasonable ylimit for the upper bound by figuring out the highest point in your plotting region |
shadelim |
A vector containing the upper endpoint and the lower endpoint of the region you want to shade |
col |
The color of the shaded region |
xlab |
Label for the x-axis |
ylab |
Label for the y-axis |
main |
Title for the plot |
... |
Additional parameters to pass onto the density function. For instance if you wanted to plot a normal density with a mean of 5 and sd of 2 you would also pass in mean=5, sd=2 in the parameter list (assuming you used dnorm as your 'func'). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.