autoplot.dist {mistr} | R Documentation |
Autoplot of Distributions Using ggplot2
Description
The function autoplot
plots the CDF and PDF of a given distribution object.
Usage
autoplot.dist(x, which = "all", ncols = 2, ...)
Arguments
x |
distribution object. |
which |
whether to plot only CDF, PDF or both, default: 'all'. |
ncols |
in how many columns should the plots be merged, default: 2. |
... |
further arguments to be passed. |
Details
The function is a wrapper of the internal plotting function plotgg. For more
details see plotgg
.
Value
ggplot object if which = "cdf" or which = "pdf". If both are plotted, the plots are
merged using multiplot()
function and a list with both plots is invisibly returned.
See Also
Examples
## Not run:
N <- normdist()
autoplot(N)
# manipulating cdf plot
B <- binomdist(12, 0.5)
autoplot(-3*B, which = "cdf", xlim1 = c(-30, -10))
# manipulating pdf plot
autoplot(-3*B, which = "pdf", xlim2 = c(-30, -10))
## End(Not run)
[Package mistr version 0.0.6 Index]