plot.dst | R Documentation |
Plot a distributional representation of a distribution.
## S3 method for class 'dst'
plot(
x,
what = c("density", "pmf", "cdf", "survival", "quantile", "hazard", "chf"),
...
)
x |
Distribution object |
what |
Name of the representation to plot. |
... |
Other arguments to pass to the |
This function is run for its graphics byproduct, and therefore returns the original distribution, invisibly.
d <- dst_norm(0, 1)
plot(d, from = -4, to = 4)
plot(d, "cdf", n = 1000)
plot(d, "survival")
plot(d, "quantile")
plot(d, "hazard")
plot(d, "chf")
p <- dst_pois(4)
plot(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.