Plot the PDF of the Gamma distribution.

plotGamma(shape, rate)

Arguments

shape

shape (\(\alpha\)) parameter of the Gamma distribution.

rate

rate (\(\beta\)) parameter of the Gamma distribution.

Value

The PDF of Gamma(shape, rate).

Details

Note: We use the shape/rate parametrization of Gamma. See https://en.wikipedia.org/wiki/Gamma_distribution for details.

Note

The output can be treated like any ggplot2 object and modified accordingly.

Examples

plotGamma(1, 1)
plotGamma(2, 5)
if (FALSE) plotGamma(2, 5) + ggtitle('I hate the default title!')