Sometimes we want to shade areas under a density on a graphic, for instance to illustrate a p-value or a region under the normal curve. Using the polygon() function from base R we can make graphics like the following one: How to do it First we have to plot the graphic of the function whose