powered by
Plot Probability Mass Function Values
plot_pmf(x, y, ..., col = "grey", add = FALSE)
No return value, this function generates a plot in the current graphics device.
values
probability mass values y = f(x)
y = f(x)
passed to plot() and rect()
plot()
rect()
Fill color of bars.
Add bars to existing plot.
Plots the probability values as a barplot.
x <- seq(0, 5) y <- dpois(x, lambda = 2) plot_pmf(x, y)
Run the code above in your browser using DataLab