| geom_density {ggplot2} | R Documentation |
Display a smooth density estimate
geom_density(mapping = NULL, data = NULL, stat = "density", position = "identity",
na.rm = FALSE, ...)
mapping |
mapping between variables and aesthetics generated by aes |
data |
dataset used in this layer, if not specified uses plot dataset |
stat |
statistic used by this layer |
position |
position adjustment used by this layer |
na.rm |
NULL |
... |
ignored |
A smooth density estimate calculated by stat\_densityThis page describes geom\_density, see layer and qplot for how to create a complete plot from individual components.
A layer
The following aesthetics can be used with geom\_density. Aesthetics are mapped to variables in the data with the aes function: geom\_density(aes(x = var))
x: x position (required)
y: y position (required)
fill: internal colour
weight: observation weight used in statistical transformation
colour: border colour
alpha: transparency
size: size
linetype: line type
Hadley Wickham, http://had.co.nz/
## Not run: # See stat_density for examples ## End(Not run)