ggDensity {ggiraphExtra} | R Documentation |
Make a density plot with histogram
Description
Make a density plot with histogram
Usage
ggDensity(
data,
mapping,
linecolor = "red",
addhist = TRUE,
use.label = TRUE,
use.labels = TRUE
)
Arguments
data |
a data.frame |
mapping |
Set of aesthetic mappings created by aes or aes_. |
linecolor |
Color of density curve |
addhist |
Whether add histogram or not |
use.label |
Logical. Whether or not use column label in case of labelled data |
use.labels |
Logical. Whether or not use value labels in case of labelled data |
Examples
require(ggplot2)
require(moonBook)
ggDensity(acs,aes(x=age))
ggDensity(acs,aes(x=age,color=sex,fill=sex),addhist=FALSE)
ggDensity(acs,aes(x=age,color=sex,fill=sex))
ggDensity(acs,aes(x=age,fill=sex),addhist=FALSE)
ggDensity(acs,aes(x=age,color=sex))
[Package ggiraphExtra version 0.3.0 Index]