Description Usage Arguments Details Value Author(s) Examples
Plot a gamma density
1 |
alpha |
the gamma's alpha parameter |
beta |
the gamma's beta parameter |
n |
number of points to plot |
q |
quantile used for xmax |
... |
... |
plotGamma creates a basic ggplot which can be styled.
a ggplot object
David Kahle david.kahle@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
plotGamma(1, 1)
plotGamma(.5, .5)
plotGamma(2, 2)
plotGamma(1:5, 1)
plotGamma(1, 1:5)
plotGamma(.5, .5, q = .999)
plotGamma(.5, .5, q = .99)
plotGamma(.5, .5, q = .9)
plotGamma(2, 2) + theme_bw()
plotGamma(2, 2) + theme_classic()
plotGamma(2, c(2, 4)) + theme_classic()
theme_set(theme_bw())
plotGamma(2, 2) + labs(x = "theta", y = "")
plotGamma(2, 2) + ggtitle("my plot")
plotGamma(2, 2) + labs(x = expression(lambda[1]), y = "belief")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.