Learn R Programming

psborrow2 (version 0.0.4.0)

plot_pdf: Plot Probability Density Function Values

Description

Plot Probability Density Function Values

Usage

plot_pdf(x, y, ...)

Value

No return value, this function generates a plot in the current graphics device.

Arguments

x

values

y

probability density values y = f(x)

...

passed to plot()

Plots the density values as a curve with the lower vertical limit set to 0.

Examples

Run this code
x <- seq(-2, 2, len = 100)
y <- dnorm(x)
plot_pdf(x, y)

Run the code above in your browser using DataLab