plotDensity | R Documentation |
Plot multiple density functions on same graph
plotDensity(
density_ls,
colors_ls = brewer.pal(8, "Dark2"),
main_v = "",
x_v = "",
names_v = NULL,
lwd_v = 2
)
density_ls |
list of either densities or vectors |
colors_ls |
list of colors one for each element of density_ls |
main_v |
character vector for title |
x_v |
character vector for x-axis |
names_v |
names to plot to legend. If NULL, will use names of density_ls. |
lwd_v |
line width |
print density plot to console
set.seed(1)
d_ls <- list("A" = rnorm(1000), "B" = rnorm(1000, mean = 2, sd = 1), "C" = rnorm(1000, mean = -1, sd = 0.5))
plotDensity(d_ls)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.