plot_densities: Plot densities

Description Usage Arguments Value Examples

View source: R/plot_densities.R

Description

The function plots multiple density curves and compares their modes

Usage

1
2
3
4
5
6
7
8
plot_densities(
  hists,
  id,
  col = c("lightgrey"),
  xlab = "",
  ylab = "Density",
  mode = "hist"
)

Arguments

hists

list of histogram objects or density objects

id

string

col

color for shading

xlab

string x-axis label

ylab

string y-axis label

mode

flag indicating histogram or density

Value

null

Examples

1
2
3
4
5
aurocsA <- density((runif(1000)+runif(1000)+runif(1000)+runif(1000))/4)
aurocsB <- density((runif(1000)+runif(1000)+runif(1000))/3)
aurocsC <- density(runif(1000))
hists <- list(aurocsA, aurocsB, aurocsC)
temp <- plot_densities(hists,'', mode='density')

EGAD documentation built on Nov. 8, 2020, 8:31 p.m.