Learn R Programming

discreteRV (version 1.2.2)

plot.RV: Plot a random variable of class "RV"

Description

Plot a random variable of class "RV"

Usage

"plot"(x, ..., tol = 1e-10, pch = 16, cex = 1.2, lwd = 2, col = "black", xlab = "Possible Values", ylab = "Probabilities")

Arguments

x
A random variable
...
Additional arguments to be passed to the "plot" function
tol
Only display outcomes with probabilities above tol
pch
Either an integer specifying a symbol or a single character to be used as the default in plotting points.
cex
A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default.
lwd
The line width, a positive number, defaulting to 2.
col
A specification for the default plotting color
xlab
Label for the X axis
ylab
Label for the Y axis

Examples

Run this code
fair.die <- RV(1:6, rep(1/6,6))
plot(fair.die)

Run the code above in your browser using DataLab