Learn R Programming

DataExplorer (version 0.7.0)

plot_density: Plot density estimates

Description

Plot density estimates for each continuous feature

Usage

plot_density(data, geom_density_args = list(), title = NULL,
  ggtheme = theme_gray(), theme_config = list(), nrow = 4L,
  ncol = 4L, parallel = FALSE)

Arguments

data

input data

geom_density_args

a list of other arguments to geom_density

title

plot title

ggtheme

complete ggplot2 themes. The default is theme_gray.

theme_config

a list of configurations to be passed to theme.

nrow

number of rows per page. Default is 4.

ncol

number of columns per page. Default is 4.

parallel

enable parallel? Default is FALSE.

Value

invisibly return the named list of ggplot objects

See Also

geom_density plot_histogram

Examples

Run this code
# NOT RUN {
# Plot using iris data
plot_density(iris)

# Plot using random data
set.seed(1)
data <- cbind(sapply(seq.int(4L), function(x) {
          runif(500, min = sample(100, 1), max = sample(1000, 1))
        }))
plot_density(data)

# Add color to density area
plot_density(data, geom_density_args = list("fill" = "black", "alpha" = 0.6))
# }

Run the code above in your browser using DataLab