autoplot.dist | R Documentation |
The function autoplot
plots the CDF and PDF of a given distribution object.
autoplot.dist(x, which = "all", ncols = 2, ...)
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. |
The function is a wrapper of the internal plotting function plotgg. For more
details see plotgg
.
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.
plotgg
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.